mirror of
https://github.com/zadam/trilium.git
synced 2025-06-05 17:38:47 +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)) {
|
||||
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…
x
Reference in New Issue
Block a user