fix events from keyboard shortcuts

This commit is contained in:
zadam 2020-03-17 22:49:43 +01:00
parent 72cc54a83f
commit 280955b3a2
2 changed files with 6 additions and 2 deletions

View file

@ -624,7 +624,11 @@ export default class NoteTreeWidget extends TabAwareWidget {
for (const action of actions) {
for (const shortcut of action.effectiveShortcuts) {
hotKeyMap[utils.normalizeShortcut(shortcut)] = node => this.triggerCommand(action.actionName, {node});
hotKeyMap[utils.normalizeShortcut(shortcut)] = node => {
this.triggerCommand(action.actionName, {node});
return false;
}
}
}

View file

@ -23,7 +23,7 @@ export default class TabCachingWidget extends TabAwareWidget {
this.widgets[tabId] = this.widgetFactory();
const $renderedWidget = this.widgets[tabId].render();
this.widgets[tabId].toggleExt(this.isTab(tabId));
this.widgets[tabId].toggleExt(false); // new tab is always not active, can be activated after creation
this.$widget.after($renderedWidget);