Repository navigation
Stop Escape propagation in settings list edit widgets - #297605
Merged
Benjamin Pasero (bpasero) merged 2 commits intoFeb 25, 2026
Merged
Conversation
…l dialog from closing When editing a list item in the settings editor (e.g., Add Item for less.lint.validProperties), pressing Escape should cancel the edit operation, not close the entire modal settings dialog. The Escape key handlers in ListSettingWidget and ObjectSettingDropdownWidget were calling preventDefault() but not stopPropagation(), allowing the event to bubble up to the modal container's Escape handler which closed the dialog. Fixes #296337 Co-authored-by: bpasero <[email protected]>
Copilot
AI
changed the title
[WIP] Fix escape key behavior in modal settings dialog
Stop Escape propagation in settings list edit widgets
Feb 25, 2026
Benjamin Pasero (bpasero)
marked this pull request as ready for review
February 25, 2026 06:57
Benjamin Pasero (bpasero)
enabled auto-merge (squash)
February 25, 2026 06:57
Contributor
📬 CODENOTIFYThe following users are being notified based on files changed in this PR: Raymond Zhao (@rzhao271)Matched files:
|
Contributor
There was a problem hiding this comment.
Pull request overview
This PR fixes an issue where pressing Escape while editing a new item in a settings list (e.g., adding a value to less.lint.validProperties) closes the entire modal settings dialog instead of just canceling the edit operation.
Changes:
- Added
e.stopPropagation()to Escape key handlers inListSettingWidgetandObjectSettingDropdownWidgetto prevent event bubbling to the modal container
Robo (deepak1556)
approved these changes
Feb 25, 2026
Benjamin Pasero (bpasero)
deleted the
copilot/fix-modal-settings-dialog
branch
February 25, 2026 07:17
This file contains hidden or 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
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
In the modal settings dialog, pressing Escape while editing a new list item (e.g.
less.lint.validProperties→ Add Item) closes the entire dialog instead of just canceling the edit.The Escape handlers in
ListSettingWidgetandObjectSettingDropdownWidgetcalle.preventDefault()but note.stopPropagation(), so the event bubbles up to the modal container's Escape listener which closes the dialog.e.stopPropagation()alongside existinge.preventDefault()in bothrenderEditandrenderStringEditWidgetEscape handlers insettingsWidgets.tsOriginal prompt
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.