mirror of
https://github.com/discourse/discourse.git
synced 2025-02-22 07:14:26 +08:00
FIX: closes search-menu on escape (#7804)
This commit is contained in:
parent
690fb5c4fb
commit
a91881280d
@ -204,6 +204,12 @@ export default createWidget("search-menu", {
|
||||
},
|
||||
|
||||
keyDown(e) {
|
||||
if (e.which === 27 /* escape */) {
|
||||
this.sendWidgetAction("toggleSearchMenu");
|
||||
e.preventDefault();
|
||||
return false;
|
||||
}
|
||||
|
||||
if (searchData.loading || searchData.noResults) {
|
||||
return;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user