FIX: closes search-menu on escape (#7804)

This commit is contained in:
Joffrey JAFFEUX 2019-06-26 11:53:39 +02:00 committed by GitHub
parent 2af4002817
commit ea2a9bc4fc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 6 additions and 0 deletions

View File

@ -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;
}