mirror of
https://github.com/zadam/trilium.git
synced 2025-11-16 10:15:52 +01:00
return focus to the previously focused element after closing the dialog, fixes #861
This commit is contained in:
@@ -287,8 +287,6 @@ function initKoPlugins() {
|
||||
}
|
||||
|
||||
export async function showDialog() {
|
||||
utils.closeActiveDialog();
|
||||
|
||||
await libraryLoader.requireLibrary(libraryLoader.KNOCKOUT);
|
||||
|
||||
// lazily apply bindings on first use
|
||||
@@ -300,11 +298,9 @@ export async function showDialog() {
|
||||
ko.applyBindings(attributesModel, $dialog[0]);
|
||||
}
|
||||
|
||||
glob.activeDialog = $dialog;
|
||||
|
||||
await attributesModel.loadAttributes();
|
||||
|
||||
$dialog.modal();
|
||||
utils.openDialog($dialog);
|
||||
}
|
||||
|
||||
$dialog.on('focus', '.attribute-name', function (e) {
|
||||
|
||||
Reference in New Issue
Block a user