fix focusing ribbon tabs when using keyboard navigation on the tree

This commit is contained in:
zadam 2022-07-30 23:43:20 +02:00
parent 7c90f1a56d
commit 4c93334d90

View file

@ -188,10 +188,12 @@ export default class RibbonContainer extends NoteContextAwareWidget {
if (activeChild && (refreshActiveTab || !wasAlreadyActive)) {
const handleEventPromise = activeChild.handleEvent('noteSwitched', {noteContext: this.noteContext, notePath: this.notePath});
if (handleEventPromise) {
handleEventPromise.then(() => activeChild.focus?.());
} else {
activeChild.focus?.();
if (refreshActiveTab) {
if (handleEventPromise) {
handleEventPromise.then(() => activeChild.focus?.());
} else {
activeChild.focus?.();
}
}
}
} else {