There is a bug in the Modal component where the escape key event handler can be called even when the modal has been closed, causing it to reopen. This is because the event handler is not removed immediately in a synchronous manner when the modal is closed, and can be invoked multiple times.
There is a bug in the Modal component where the escape key event handler can be called even when the modal has been closed, causing it to reopen. This is because the event handler is not removed immediately in a synchronous manner when the modal is closed, and can be invoked multiple times.
You can see it on the official demo page by just opening the first modal, and pressing escape twice in a row quickly : https://sveltestrap.js.org/?path=/story/components--modals