-
Notifications
You must be signed in to change notification settings - Fork 2.9k
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
Don't close 2 dialogs from 1 escape keydown (more-info) #23702
Conversation
You're right that it's not intended. I just couldn't find a good way to handle this centrally |
Maybe we should have a parent Dialog class or mixin to handle this logic as it would be very verbose to add it to every dialog that might lead to another |
FYI |
Another approach could be to always disable |
It doesn't happen that often I think, (as I think the pattern is already discouraged), so it might not be bad to just bespoke fix it in the one or two places it creeps up. I think ths schedule case is also a bit nasty as now people can take a fair bit of time to setup a detailed schedule, and one errant keystroke can cause that all to be lost without warning. So it might be nice to fix this even if it's slightly redundant with some major redesign planned for the far future. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@karwosts you are right, we can merge this and if we gonna migrate the framework we need to rework at it either way.
Thank you!
@karwosts can you please solve the merge conflicts? |
Resolved |
Proposed change
There are a couple places in more-info dialog that open another dialog on top, such as "change the device area" dialog, or the detailed item dialog for schedule.
Currently one escape press will close both dialogs, which I think it not expected. I'd expect first press to close the top dialog, second press to close the more-info dialog.
Similar implementation as this exists already in hui-dialog-edit-card.
Type of change
Example configuration
Additional information
Checklist
If user exposed functionality or configuration variables are added/changed: