Closed rkyoku closed 5 years ago
@rkyoku I do understand your use case, but the solution isn't as simple as stopping propagation of the event. Since they are attached to the document.
I'm going to investigate a fix for your situation today. The changes I am planning:
sir, I am having trouble creating a website with LightBox
When pressing the
ESCAPE
key, lightbox closes itself. Nice! :)However, it does not capture the event, which therefore bubbles up in another plugin I have, and I cannot modify the plugin code.
I will try and modify lightbox code instead, whilst waiting for an input on this one.
EDIT: more info: I am using MaterializeCSS modals. Inside some of them, I have some images that I use lightbox with. When lightbox is open on top of the modal and pressing the ESCAPE key (which closes the modal by default), lightbox should be the first to handle the event, and it should (IMHO) catch it and not let it propagate. That way, the modal does not closes whenever I close lightbox.
Thanks in advance!
Best,