Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dialog escape key handling leaves overlay active #1030

Open
IMinchev64 opened this issue Jan 17, 2024 · 3 comments
Open

Dialog escape key handling leaves overlay active #1030

IMinchev64 opened this issue Jan 17, 2024 · 3 comments

Comments

@IMinchev64
Copy link

Description

When the dialog is opened, if the user does not click anywhere else on the screen and press the Escape key the dialog is closed but the gray overlay remains.

Steps to reproduce

  1. Navigate to one of the dialog samples such as this one.
  2. Open the dialog by clicking the "Show Dialog" button.
  3. Without clicking anywhere else or interacting with the dialog, press the Escape key.

Result

The dialog itself closes, but a gray overlay remains on the screen, indicating the dialog close action is not fully completed.

Expected result

The dialog closes and the overlay is removed, returning to the normal view.

Attachments

None

@IMinchev64 IMinchev64 added bug Something isn't working 🆕 status: new The issue is new and will be reviewed when somebody picks it up. dialog labels Jan 17, 2024
@rkaraivanov
Copy link
Member

Can you provide a short clip or some other information, such as a console error if available?
I can't reproduce the issue on my end.

@IMinchev64
Copy link
Author

@rkaraivanov surely, here you go:

2024-01-18.11-27-58.mp4

@rkaraivanov
Copy link
Member

Alright, it seems this issue runs deeper than I initially thought.

I still can't reproduce it on my end with these browser builds:
Edge Version 122.0.2325.0 (Official build) dev (64-bit)
Chrome Version 120.0.6099.225 (Official Build) (64-bit)
Firefox 123.0a1 (2024-01-17) (64-bit)

After digging through the Chromium bug tracker, I came to this:
https://bugs.chromium.org/p/chromium/issues/detail?id=1512224&q=component%3ABlink%3EHTML%3EDialog&can=1

I guess this was "regressed" in Chrome for some time during the end of last year but seems to be reverted at least in the version I tested with. I guess the version of Edge you use in your showcase is one that has the new behavior.

I'll mark it as a 3rd party issue, since there is no straightforward fix. Firefox and Safari have not yet implemented the proposed API. Attaching a close handler is doable but then there will be behavioral changes in the component in the case when a user opens it and then immediately presses Esc (events not firing correctly, keepOpenOnEscape not working).

I'll set this in review and discuss with the rest of the team possible solutions.

@rkaraivanov rkaraivanov added status: third-party-issue 👀 status: in-review and removed 🆕 status: new The issue is new and will be reviewed when somebody picks it up. labels Jan 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants