mirror of
https://github.com/zadam/trilium.git
synced 2025-02-23 22:44:44 +08:00
escape should close the recent notes dialog
This commit is contained in:
parent
4b1d1aba74
commit
438f7c5b0b
1 changed files with 9 additions and 3 deletions
|
@ -59,9 +59,15 @@ const recentNotes = (function() {
|
||||||
event.preventDefault();
|
event.preventDefault();
|
||||||
},
|
},
|
||||||
close: function (event, ui) {
|
close: function (event, ui) {
|
||||||
// keep autocomplete open
|
if (event.keyCode === 27) { // escape closes dialog
|
||||||
// we're kind of abusing autocomplete to work in a way which it's not designed for
|
$searchInput.autocomplete('destroy');
|
||||||
$searchInput.autocomplete("search", "")
|
$dialog.dialog('close');
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
// keep autocomplete open
|
||||||
|
// we're kind of abusing autocomplete to work in a way which it's not designed for
|
||||||
|
$searchInput.autocomplete("search", "");
|
||||||
|
}
|
||||||
},
|
},
|
||||||
create: () => $searchInput.autocomplete("search", ""),
|
create: () => $searchInput.autocomplete("search", ""),
|
||||||
classes: {
|
classes: {
|
||||||
|
|
Loading…
Reference in a new issue