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

Keyboard navigation with arrows malfunctioning when Lightbox initialized multiple times #702

Open
MichalRemis opened this issue Jan 16, 2021 · 0 comments

Comments

@MichalRemis
Copy link

When lightbox is initialized multiple times (e.g. when Ajax content is loaded and lightbox needs to be reenabled), Lightbox keyboard navigation doesn't work properly - arrow keys are skipping multiple images, not just one. It's because keyboard listeners are bound multiple times when opening lightbox.

Example:

  1. go to https://lokeshdhakar.com/projects/lightbox2/ ,
  2. open console and type lightbox.init()
  3. click on FOUR IMAGE SET lightbox and try to navigate with arrows
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants