mirror of
				https://github.com/zadam/trilium.git
				synced 2025-10-31 19:49:01 +01:00 
			
		
		
		
	Merge remote-tracking branch 'origin/stable'
# Conflicts: # package-lock.json
This commit is contained in:
		
						commit
						61aa029582
					
				| @ -497,6 +497,16 @@ export default class AttributeEditorWidget extends NoteContextAwareWidget { | |||||||
|         await this.renderOwnedAttributes(attributes, false); |         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}) { |     entitiesReloadedEvent({loadResults}) { | ||||||
|         if (loadResults.getAttributes(this.componentId).find(attr => attributeService.isAffecting(attr, this.note))) { |         if (loadResults.getAttributes(this.componentId).find(attr => attributeService.isAffecting(attr, this.note))) { | ||||||
|             this.refresh(); |             this.refresh(); | ||||||
|  | |||||||
| @ -186,7 +186,9 @@ export default class RibbonContainer extends NoteContextAwareWidget { | |||||||
|             const activeChild = this.getActiveRibbonWidget(); |             const activeChild = this.getActiveRibbonWidget(); | ||||||
| 
 | 
 | ||||||
|             if (activeChild && (refreshActiveTab || !wasAlreadyActive)) { |             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 { |         } else { | ||||||
|             this.lastActiveComponentId = null; |             this.lastActiveComponentId = null; | ||||||
|  | |||||||
| @ -82,4 +82,8 @@ export default class OwnedAttributeListWidget extends NoteContextAwareWidget { | |||||||
|             this.getTitle(this.note); |             this.getTitle(this.note); | ||||||
|         } |         } | ||||||
|     } |     } | ||||||
|  | 
 | ||||||
|  |     focus() { | ||||||
|  |         this.attributeEditorWidget.focus(); | ||||||
|  |     } | ||||||
| } | } | ||||||
|  | |||||||
| @ -310,6 +310,10 @@ export default class PromotedAttributesWidget extends NoteContextAwareWidget { | |||||||
|         $attr.attr("data-attribute-id", result.attributeId); |         $attr.attr("data-attribute-id", result.attributeId); | ||||||
|     } |     } | ||||||
| 
 | 
 | ||||||
|  |     focus() { | ||||||
|  |         this.$widget.find(".promoted-attribute-input:first").focus(); | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|     entitiesReloadedEvent({loadResults}) { |     entitiesReloadedEvent({loadResults}) { | ||||||
|         if (loadResults.getAttributes(this.componentId).find(attr => attributeService.isAffecting(attr, this.note))) { |         if (loadResults.getAttributes(this.componentId).find(attr => attributeService.isAffecting(attr, this.note))) { | ||||||
|             this.refresh(); |             this.refresh(); | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user
	 zadam
						zadam