biati-digital / glightbox

Pure Javascript lightbox with mobile support. It can handle images, videos with autoplay, inline content and iframes
MIT License
2.01k stars 226 forks source link

Enhance keyboard event handling to include select element in focus check #508

Open alex-one-v opened 1 month ago

alex-one-v commented 1 month ago

Summary: Modified the keyboard event handler to include the select element in the focus check condition, ensuring the correct handling of Tab key events when a select element is focused.

Details: Added select to the list of elements (input, textarea, button) that prevent further handling of the Tab key event. This change ensures that when a select element is focused, the Tab key event will not trigger the custom focus logic, maintaining the expected behavior for form navigation.

Testing: Manually tested the change to ensure that the Tab key behaves correctly when a select element is focused. Confirmed that the modification does not affect the existing functionality for input, textarea, and button elements.

gingerchew commented 1 month ago

Hey there @alex-one-v,

Thanks for bringing this to our attention, currently we're on a PR freeze #472 while we prepare for the next version. I'll leave this open for right now so that others can find the solution if they run into the same issue 😊