mirror of
https://github.com/zadam/trilium.git
synced 2025-10-29 09:16:45 +01:00
focus promoted/owned attributes input after activating the ribbon tab, closes #2606
This commit is contained in:
@@ -497,6 +497,16 @@ export default class AttributeEditorWidget extends NoteContextAwareWidget {
|
||||
await this.renderOwnedAttributes(attributes, false);
|
||||
}
|
||||
|
||||
focus() {
|
||||
this.$editor.trigger('focus');
|
||||
|
||||
this.textEditor.model.change( writer => {
|
||||
const positionAt = writer.createPositionAt(this.textEditor.model.document.getRoot(), 'end');
|
||||
|
||||
writer.setSelection(positionAt);
|
||||
} );
|
||||
}
|
||||
|
||||
entitiesReloadedEvent({loadResults}) {
|
||||
if (loadResults.getAttributes(this.componentId).find(attr => attributeService.isAffecting(attr, this.note))) {
|
||||
this.refresh();
|
||||
|
||||
Reference in New Issue
Block a user