-
-
Notifications
You must be signed in to change notification settings - Fork 8.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: use native modal dialog and use its backdrop
This uses the `<dialog>` element with `showModal()` method, so that we can leverage the browser's built-in ways to make this dialog modal, including keyboard handling (Esc), backdrop and focus trap. Fixes the issue that it was possible to tab outside the dialog while it was open. This removes the backdrop component, as the `<dialog>` element comes with a backdrop built-in, that is styled via CSS instead.
- Loading branch information
Showing
3 changed files
with
50 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters