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
Switch back to window scope
Zack Rauena83e8ff91a99
diff --git a/src/public/app/widgets/tab_row.js b/src/public/app/widgets/tab_row.jsindex 07c581056a..4172052d51 100644--- a/src/public/app/widgets/tab_row.js+++ b/src/public/app/widgets/tab_row.js@@ -268,11 +268,11 @@ export default class TabRowWidget extends BasicWidget {});});- keyboardActionService.setupActionsForElement('tabs', $(document), this);+ keyboardActionService.setupActionsForElement('window', $(document), this);}goToTab(tabNumber) {- const index = tabNumber === 0 ? this.tabEls.length - 1 : tabNumber - 1;+ const index = tabNumber === Number.POSITIVE_INFINITY ? this.tabEls.length - 1 : tabNumber - 1;const tab = this.tabEls[index];if (!tab) return;appContext.tabManager.activateNoteContext(tab.getAttribute('data-ntx-id'));@@ -287,7 +287,7 @@ export default class TabRowWidget extends BasicWidget {seventhTabCommand() {this.goToTab(7);}eigthTabCommand() {this.goToTab(8);}ninthTabCommand() {this.goToTab(9);}- lastTabCommand() {this.goToTab(0);}+ lastTabCommand() {this.goToTab(Number.POSITIVE_INFINITY);}setupStyle() {this.$style = $("<style>");diff --git a/src/services/keyboard_actions.js b/src/services/keyboard_actions.jsindex a2c1cae26c..6b6cb558e3 100644--- a/src/services/keyboard_actions.js+++ b/src/services/keyboard_actions.js@@ -235,61 +235,61 @@ const DEFAULT_KEYBOARD_ACTIONS = [actionName: "firstTab",defaultShortcuts: ["CommandOrControl+1"],description: "Activates the first tab in the list",- scope: "tabs"+ scope: "window"},{actionName: "secondTab",defaultShortcuts: ["CommandOrControl+2"],description: "Activates the second tab in the list",- scope: "tabs"+ scope: "window"},{actionName: "thirdTab",defaultShortcuts: ["CommandOrControl+3"],description: "Activates the third tab in the list",- scope: "tabs"+ scope: "window"},{actionName: "fourthTab",defaultShortcuts: ["CommandOrControl+4"],description: "Activates the fourth tab in the list",- scope: "tabs"+ scope: "window"},{actionName: "fifthTab",defaultShortcuts: ["CommandOrControl+5"],description: "Activates the fifth tab in the list",- scope: "tabs"+ scope: "window"},{actionName: "sixthTab",defaultShortcuts: ["CommandOrControl+6"],description: "Activates the sixth tab in the list",- scope: "tabs"+ scope: "window"},{actionName: "seventhTab",defaultShortcuts: ["CommandOrControl+7"],description: "Activates the seventh tab in the list",- scope: "tabs"+ scope: "window"},{actionName: "eigthTab",defaultShortcuts: ["CommandOrControl+8"],description: "Activates the eigth tab in the list",- scope: "tabs"+ scope: "window"},{actionName: "ninthTab",defaultShortcuts: ["CommandOrControl+9"],description: "Activates the ninth tab in the list",- scope: "tabs"+ scope: "window"},{actionName: "lastTab",defaultShortcuts: ["CommandOrControl+0"],description: "Activates the last tab in the list",- scope: "tabs"+ scope: "window"},