mirror of
https://github.com/zadam/trilium.git
synced 2024-09-20 23:55:59 +08: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)) {
|
||||
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 {
|
||||
|
|
Loading…
Reference in a new issue