feat: close maximized panels with escape key#2533
Conversation
There was a problem hiding this comment.
Pull Request Overview
This PR adds the ability to close maximized panels by pressing the Escape key, addressing issue #1165. The feature intelligently excludes input elements to avoid conflicting with their built-in Escape key behaviors.
- Added escape key handling to close maximized panels
- Implemented input element detection to prevent conflicts with existing escape behaviors
- Added proper event binding and cleanup for the keydown handler
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #2533 +/- ##
==========================================
- Coverage 44.57% 44.56% -0.02%
==========================================
Files 764 764
Lines 42807 42821 +14
Branches 10765 10773 +8
==========================================
+ Hits 19083 19084 +1
- Misses 23713 23726 +13
Partials 11 11
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
mattrunyon
left a comment
There was a problem hiding this comment.
This breaks clearing selection on a grid while maximized. We seem to not stop propagation of the escape key event on grid so that you can close linker
One potential fix would be to stop propagation on grid escape in SelectionKeyHandler and change linker close to use capture phase. I think that should work
|
Actually looks like linker already uses capture phase, so might just be able to consume the event in Grid? Although then it will always eat it because it still handles clearing nothing |
|
Changed to only stop propagation when clearing. If grid has selection and focus, and grid is maximized, and linker is open: 1st escape clears grid |
fixes: #1165
Was annoyed with this while working on something, add handling to escape close maximize fields.
Exclude if inputs are focused (ex. monaco uses escape to deselect, but doesn't consume it, native searches clear field but don't consume it either).