Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

When using group, duplicate links always opens the first item in the group #114

Open
roborourke opened this issue May 9, 2023 · 2 comments

Comments

@roborourke
Copy link

Hi, we've encountered an issue whereby a series of links to open the lightbox in the same group will always open the ligthbox on the first item in the group rather than on the item for the link that was clicked.

For a solution would you rather:

  1. Always open on the clicked item
  2. A config option for whether to open on first item or selected item
@roborourke
Copy link
Author

This might actually be an issue with the duplicate handling code. Possible if init is called twice, then the event listener from the add() method will already be there and then the event listener from the duplicate check will get added too and fire second.

The duplicate handling added in #59 doesn't try to figure out or pass an index to the open() function, not sure if it should try to find the index for what it's duplicating?

@roborourke roborourke changed the title When using groups it always opens the first item in the list When using group, duplicate links always opens the first item in the group May 10, 2023
@midzer
Copy link
Owner

midzer commented Jun 13, 2023

hi @roborourke and thanks for opening up!

I think a small demo of the issue would be good as I am not using tobii groups feature anywhere.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants