mirror of
https://github.com/gristlabs/grist-core.git
synced 2024-10-27 20:44:07 +00:00
(core) fix closing of the search bar
Summary: - Sending `ESCAPE` while hovering the options panel was not working - This is because of the keepExpanded flag which was set to true - Solution is to set the keepExpanded flag to false, prior to toggling the Menu Test Plan: - Tested manually Reviewers: paulfitz Reviewed By: paulfitz Differential Revision: https://phab.getgrist.com/D2836
This commit is contained in:
parent
7758cb830d
commit
8c6148dd9f
@ -144,7 +144,7 @@ export function searchBar(model: SearchModel, testId: TestId = noTestId) {
|
||||
)),
|
||||
dom.onKeyDown({
|
||||
Enter: () => model.findNext(),
|
||||
Escape: () => toggleMenu(false),
|
||||
Escape: () => { keepExpanded = false; toggleMenu(false); },
|
||||
// Catch both Tab and Shift+Tab to prevent focus entering unrelated editable label.
|
||||
Tab: () => toggleMenu(false),
|
||||
}),
|
||||
|
Loading…
Reference in New Issue
Block a user