Escape key closes modal with multi-select inside it
See original GitHub issueIntroduction
When the multiselect component is inside of a modal it’s not possible to close it with the escape key. Instead it closes the entire Modal.
This doesn’t happen with a normal <select> HTML element.
Here’s a little repl and video to show you more clearly: https://svelte.dev/repl/6a6073ad3f6c4ce28545b64290a4c433?version=3.50.1
Steps to reproduce
- tab to modal
- hit enter to open modal
- tab to the MultiSelect field
- hit escape to close
Expected result
MultiSelect field closes, and Modal stays open.
Actual result
Modal closes
Issue Analytics
- State:
- Created a year ago
- Reactions:1
- Comments:6 (6 by maintainers)
Top Results From Across the Web
esc key close bootstrap modal but doesn't close select2 ...
Select2 API. In order to close the select2 you use the following: $('#experts').select2("close");. You would then tap into the close event ...
Read more >Esc key closes modal and dropdown if dropdown is open ...
When I have a modal and in the model I have a DropDown. If I click the DropDown and it opens clicking ESC...
Read more >Modal | ToolJet - Documentation
Modal widget renders in front of a backdrop, and it blocks interaction ... Enabling this option closes the modal(opened) whenever the escape key...
Read more >Lightning Experience Tips for Screen Readers - Salesforce Help
Close a modal dialog by using the Close button near the top of the modal or by pressing the Escape key. When you...
Read more >Modal | Mantine
You can remove modal title and close button. It will still be possible to close modal by clicking on overlay or pressing escape....
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

This is out now in v7.0.0.
@Snailedlt The fix is not yet released. I’ll cut a new release soon once #123 is merged. Once that’s out it’s as simple as telling your package manager (
npm,yarn,pnpm) to updatesvelte-multiselectfollowed by consulting the readme to see if any of the recent breaking changes concern you.