fix(settings): make the Esc keycap close the modal it advertises - #499
Open
mostafasadeghidev wants to merge 1 commit into
Open
fix(settings): make the Esc keycap close the modal it advertises#499mostafasadeghidev wants to merge 1 commit into
mostafasadeghidev wants to merge 1 commit into
Conversation
The footer reads `[Esc] close`, and the keycap looks like a button because every `Kbd` depresses on `:active`. Clicking it played that press animation and did nothing; the pointer over the word "close" turned into a text caret and a click just selected the text. An operator reasonably concluded the modal could not be dismissed with the mouse. It could — the backdrop has always closed it, and Escape works — but a control that animates under the cursor and then ignores the click is worse than no control, because it answers the question wrongly. So the hint becomes the button it already looked like. `Kbd` itself is untouched: six other surfaces render it as a genuine keyboard hint where the press styling is right, and only this one sits next to the word "close". The file header claimed there was no dedicated close button. There is one now, so it says so. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
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 join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
The settings modal's footer reads
[Esc] close, and the keycap looks like a button because everyKbddepresses on:active.Clicking it played that press animation and did nothing. The pointer over the word "close" turned into a text caret, and a click just selected the text.
Both dismissal paths already worked — backdrop click and Escape — so nothing was broken. But a control that animates under the cursor and then ignores the click answers the question wrongly: an operator who tries it concludes the modal cannot be dismissed with the mouse and stops looking. That is what happened, which is how this was found.
So the hint becomes the button it already looked like.
Kbditself is untouched. Six other surfaces render it as a genuine keyboard hint — Spotlight, its footer and rows, the module inserter and its shortcut list, the keybindings help — where the press styling is right and there is nothing to click. Only this one sits next to the word "close".The file header claimed there was no dedicated close button; there is one now, so it says so.
One test added beside the existing backdrop-close case.
Verified by hand on a live install before submitting.
Co-Authored-By: Claude Opus 5 noreply@anthropic.com