-
-
Notifications
You must be signed in to change notification settings - Fork 6.2k
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
feat(client): close vite-error-overlay
with Escape key
#13795
Conversation
Run & review this pull request in StackBlitz Codeflow. |
Looking good. |
While adding test, I found out that pressing Escape key doesn't close the overlay. It was because of Therefore, I localized |
I have put the How I solved it was to assign Due to the fact that I've checked that setting |
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.
Looks great!
Thanks a lot for the approval! @bluwy
Regarding the code that you provided, I think there are no tests around handling the If that's the case, do you mind if I open a new issue and add some tests, after this PR? |
For sure feel free to followup on that. We currently cover that part of the code in the |
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.
Nice! @bluwy do you think we can merge this in a patch? It is a new feature so the safest may be to add it to Vite 5 milestone.
Yeah I think we can merge this as patch too. Was hoping to get another eye before merging. |
Description
fixes #13748
Pressing
esc
key closes the error overlay.I made sure to remove the EventListener after the overlay is closed.
Additional context
I added an
'keydown'
EventListener todocument
.Please let me know if it is inappropriate.
What is the purpose of this pull request?
Before submitting the PR, please make sure you do the following
fixes #123
).