question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Escape key closes modal with multi-select inside it

See original GitHub issue

Introduction

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

https://user-images.githubusercontent.com/43886029/192564879-e45a280e-b39e-4599-b50f-5e9fccbe3746.mp4

Steps to reproduce

  1. tab to modal
  2. hit enter to open modal
  3. tab to the MultiSelect field
  4. hit escape to close

Expected result

MultiSelect field closes, and Modal stays open.

Actual result

Modal closes

Issue Analytics

  • State:closed
  • Created a year ago
  • Reactions:1
  • Comments:6 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
janoshcommented, Oct 3, 2022

This is out now in v7.0.0.

1reaction
janoshcommented, Oct 3, 2022

@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 update svelte-multiselect followed by consulting the readme to see if any of the recent breaking changes concern you.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found