fix(uber_search): prevent esc key hiding select options#29
Open
melonunderground wants to merge 2 commits intoculturecode:masterfrom
Open
fix(uber_search): prevent esc key hiding select options#29melonunderground wants to merge 2 commits intoculturecode:masterfrom
melonunderground wants to merge 2 commits intoculturecode:masterfrom
Conversation
Contributor
melonunderground
commented
Feb 17, 2026
- move Esc pane-hide from global pane.js to uber_search.js
- prevent panes being hidden with no selectable/visible options
- move Esc pane-hide from global pane.js to uber_search.js - prevent panes being hidden with no selectable/visible options
njakobsen
requested changes
Feb 18, 2026
javascript/uber_search.js
Outdated
| }) | ||
|
|
||
| // Hide the pane when the user presses escape | ||
| $(view).on('keyup', function(event){ |
Member
There was a problem hiding this comment.
If we attach the escape key handler to the search element instead of the document, then I would have to be focussed in the search instead of anywhere on the page. Could we pass in the alwaysOpen option to the constructor instead so it can remain where it was and we just don't attach the handler? I don't believe we expect to change the options after instantiating the UberSearch (though you'd need to confirm this through some code spelunking).
- esc key close handled in pane - pass alwaysOpen from UberSearch to pane - skip esc close when alwaysOpen true - update is safe as options is only read, not mutated
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.