Closing lightbox (from full-screen mode) using Esc throws TypeError
AlexanderFSP opened this issue · 2 comments
AlexanderFSP commented
Preconditions to reproduce the bug:
- Go to http://chocolat.insipi.de/#demo and open console panel in the DevTools
- Open lightbox (Full window) and enable full-screen mode
- After that use Esc two times (to exit at first from the full-screen mode & to close lightbox after it).
Expected result: Full-screen mode turned off, lightbox closed without any errors.
Actual result: Full-screen mode turned off, but the lightbox still visible. In the console we can observe a TypeError:
nicolas-t commented
Thanks, I'll take a look during the weekend.
nicolas-t commented
I released a fix (1.0.3)
Browser seems to be debouncing keypress events when closing the fullscreen mode, so you'll have to wait a few miliseconds between fullscreen closing and lightbox closing.