fix Jump To search input restoration

This commit is contained in:
zadam 2020-09-01 00:05:19 +02:00
parent a15f8d7e11
commit bf548f9d38
2 changed files with 11 additions and 1 deletions

View file

@ -30,6 +30,9 @@ export async function showDialog() {
}
else {
$autoComplete
// hack, the actual search value is stored in <pre> element next to the search input
// this is important because the search input value is replaced with the suggestion note's title
.autocomplete("val", $autoComplete.next().text())
.trigger('focus')
.trigger('select');
}

View file

@ -6,7 +6,14 @@ function init(callback) {
}
function wrap(callback) {
return () => init(callback);
return () => {
try {
init(callback);
}
catch (e) {
console.log(`Error occurred: ${e.message}: ${e.stack}`);
}
}
}
function get(key) {