lokesh / lightbox2

THE original Lightbox script (v2).
http://lokeshdhakar.com/projects/lightbox2/
MIT License
6.17k stars 1.76k forks source link

Lightbox closes on press of buttons O/X/C or numpad 3 button #621

Closed veerendratasol closed 5 years ago

veerendratasol commented 6 years ago

What version of Lightbox2 you are using? I am using version 2.9.0 Which browsers and operating systems have you seen the issue on? All browser and operating system

What are the steps to reproduce the bug? if you click on the official example page also http://lokeshdhakar.com/projects/lightbox2/ Click on any example image the lightbox will be opened but if you press any of the below mentioned keys the lightbox will be closed

O / X / C or numpad 3 button

Do you have link to a live site where the bug is visible? or can you post relevant HTML, CSS, and Javascript?

The issue is visible in the lightbox demo too http://lokeshdhakar.com/projects/lightbox2/

lokesh commented 5 years ago

Closing out old issues.

Thanks for reporting. These alphanumeric keys are alternatives to Esc to close the Lightbox:

  1. The x resembles the X close icon.
  2. The c is for 'Close'.
  3. And the o... well, I can't remember.

These alternatives to Esc were added a very long time ago. They aren't intuitive, they are not discoverable, and if anything, they are more likely to conflict the other keypress event handlers that a dev has tried to add. I'm going to strip them out. Thanks again.

lokesh commented 5 years ago

https://github.com/lokesh/lightbox2/pull/649

lokesh commented 5 years ago

Fixed in v2.11.0: https://github.com/lokesh/lightbox2/releases/tag/v2.11.0