focus promoted/owned attributes input after activating the ribbon tab, closes #2606

This commit is contained in:
zadam
2022-02-01 20:24:58 +01:00
parent be44431fde
commit 46eaa63625
6 changed files with 31 additions and 11 deletions

View File

@@ -186,7 +186,9 @@ export default class RibbonContainer extends NoteContextAwareWidget {
const activeChild = this.getActiveRibbonWidget();
if (activeChild && (refreshActiveTab || !wasAlreadyActive)) {
activeChild.handleEvent('noteSwitched', {noteContext: this.noteContext, notePath: this.notePath});
activeChild.handleEvent('noteSwitched', {noteContext: this.noteContext, notePath: this.notePath}).then(() => {
activeChild.focus?.();
});
}
} else {
this.lastActiveComponentId = null;