mirror of
https://github.com/zadam/trilium.git
synced 2025-06-06 18:08:33 +02:00
fix focusing ribbon tabs when using keyboard navigation on the tree
This commit is contained in:
parent
7c90f1a56d
commit
4c93334d90
@ -188,10 +188,12 @@ export default class RibbonContainer extends NoteContextAwareWidget {
|
|||||||
if (activeChild && (refreshActiveTab || !wasAlreadyActive)) {
|
if (activeChild && (refreshActiveTab || !wasAlreadyActive)) {
|
||||||
const handleEventPromise = activeChild.handleEvent('noteSwitched', {noteContext: this.noteContext, notePath: this.notePath});
|
const handleEventPromise = activeChild.handleEvent('noteSwitched', {noteContext: this.noteContext, notePath: this.notePath});
|
||||||
|
|
||||||
if (handleEventPromise) {
|
if (refreshActiveTab) {
|
||||||
handleEventPromise.then(() => activeChild.focus?.());
|
if (handleEventPromise) {
|
||||||
} else {
|
handleEventPromise.then(() => activeChild.focus?.());
|
||||||
activeChild.focus?.();
|
} else {
|
||||||
|
activeChild.focus?.();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user