mirror of
				https://github.com/zadam/trilium.git
				synced 2025-10-31 10:26:08 +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 => { |         this.$editor.on('keydown', async e => { | ||||||
|             if (e.which === 13) { |             if (e.which === 13) { | ||||||
|                 await this.save(); |                 // allow autocomplete to fill the result textarea | ||||||
|  |                 setTimeout(() => this.save(), 100); | ||||||
|             } |             } | ||||||
|  |  | ||||||
|             this.attributeDetailWidget.hide(); |             this.attributeDetailWidget.hide(); | ||||||
|   | |||||||
| @@ -167,7 +167,7 @@ export default class RibbonContainer extends NoteContextAwareWidget { | |||||||
|         }); |         }); | ||||||
|     } |     } | ||||||
|  |  | ||||||
|     toggleRibbonTab($ribbonTitle) { |     toggleRibbonTab($ribbonTitle, refreshActiveTab = true) { | ||||||
|         const activate = !$ribbonTitle.hasClass("active"); |         const activate = !$ribbonTitle.hasClass("active"); | ||||||
|  |  | ||||||
|         this.$tabContainer.find('.ribbon-tab-title').removeClass("active"); |         this.$tabContainer.find('.ribbon-tab-title').removeClass("active"); | ||||||
| @@ -183,7 +183,7 @@ export default class RibbonContainer extends NoteContextAwareWidget { | |||||||
|  |  | ||||||
|             const activeChild = this.getActiveRibbonWidget(); |             const activeChild = this.getActiveRibbonWidget(); | ||||||
|  |  | ||||||
|             if (activeChild) { |             if (activeChild && refreshActiveTab) { | ||||||
|                 activeChild.handleEvent('noteSwitched', {noteContext: this.noteContext, notePath: this.notePath}); |                 activeChild.handleEvent('noteSwitched', {noteContext: this.noteContext, notePath: this.notePath}); | ||||||
|             } |             } | ||||||
|         } else { |         } else { | ||||||
| @@ -249,7 +249,7 @@ export default class RibbonContainer extends NoteContextAwareWidget { | |||||||
|         } |         } | ||||||
|  |  | ||||||
|         if ($ribbonTabToActivate) { |         if ($ribbonTabToActivate) { | ||||||
|             $ribbonTabToActivate.trigger('click'); |             this.toggleRibbonTab($ribbonTabToActivate, false); | ||||||
|         } |         } | ||||||
|         else { |         else { | ||||||
|             this.$bodyContainer.find('.ribbon-body').removeClass("active"); |             this.$bodyContainer.find('.ribbon-body').removeClass("active"); | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user