Build your personal knowledge base with Trilium Notes
TypeScript electronelectron-appknowledge-baseknowledge-graphknowledge-managementknowledge-management-graphlocal-firstnote-managmentnote-takernote-takingnotebooknotesnotes-apppersonal-knowledge-basepersonal-wikiscriptableself-hostedself-hostingwiki
Fix shortcuts not resetting to default
dymani282d135f0f1b
diff --git a/src/public/app/widgets/type_widgets/options/shortcuts.js b/src/public/app/widgets/type_widgets/options/shortcuts.jsindex a2c89437b5..b37975b086 100644--- a/src/public/app/widgets/type_widgets/options/shortcuts.js+++ b/src/public/app/widgets/type_widgets/options/shortcuts.js@@ -116,11 +116,11 @@ export default class KeyboardShortcutsOptions extends OptionsWidget {return;}- $table.find('input.form-control').each(function() {- const defaultShortcuts = this.$widget.find(this).attr('data-default-keyboard-shortcuts');+ $table.find('input.form-control').each((_index, el) => {+ const defaultShortcuts = this.$widget.find(el).attr('data-default-keyboard-shortcuts');- if (this.$widget.find(this).val() !== defaultShortcuts) {- this.$widget.find(this)+ if (this.$widget.find(el).val() !== defaultShortcuts) {+ this.$widget.find(el).val(defaultShortcuts).trigger('change');}