mirror of
https://github.com/zadam/trilium.git
synced 2025-06-06 18:08:33 +02:00
fix broken autocomplete in attribute editor, closes #2295
This commit is contained in:
parent
4b1678c416
commit
126f41ae5e
@ -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");
|
||||||
|
Loading…
x
Reference in New Issue
Block a user