mirror of
				https://github.com/zadam/trilium.git
				synced 2025-10-30 01:36:24 +01:00 
			
		
		
		
	fix broken autocomplete in attribute editor, closes #2295
This commit is contained in:
		| @@ -193,7 +193,8 @@ export default class AttributeEditorWidget extends NoteContextAwareWidget { | ||||
|  | ||||
|         this.$editor.on('keydown', async e => { | ||||
|             if (e.which === 13) { | ||||
|                 await this.save(); | ||||
|                 // allow autocomplete to fill the result textarea | ||||
|                 setTimeout(() => this.save(), 100); | ||||
|             } | ||||
|  | ||||
|             this.attributeDetailWidget.hide(); | ||||
|   | ||||
| @@ -167,7 +167,7 @@ export default class RibbonContainer extends NoteContextAwareWidget { | ||||
|         }); | ||||
|     } | ||||
|  | ||||
|     toggleRibbonTab($ribbonTitle) { | ||||
|     toggleRibbonTab($ribbonTitle, refreshActiveTab = true) { | ||||
|         const activate = !$ribbonTitle.hasClass("active"); | ||||
|  | ||||
|         this.$tabContainer.find('.ribbon-tab-title').removeClass("active"); | ||||
| @@ -183,7 +183,7 @@ export default class RibbonContainer extends NoteContextAwareWidget { | ||||
|  | ||||
|             const activeChild = this.getActiveRibbonWidget(); | ||||
|  | ||||
|             if (activeChild) { | ||||
|             if (activeChild && refreshActiveTab) { | ||||
|                 activeChild.handleEvent('noteSwitched', {noteContext: this.noteContext, notePath: this.notePath}); | ||||
|             } | ||||
|         } else { | ||||
| @@ -249,7 +249,7 @@ export default class RibbonContainer extends NoteContextAwareWidget { | ||||
|         } | ||||
|  | ||||
|         if ($ribbonTabToActivate) { | ||||
|             $ribbonTabToActivate.trigger('click'); | ||||
|             this.toggleRibbonTab($ribbonTabToActivate, false); | ||||
|         } | ||||
|         else { | ||||
|             this.$bodyContainer.find('.ribbon-body').removeClass("active"); | ||||
|   | ||||
		Reference in New Issue
	
	Block a user