mirror of
https://github.com/zadam/trilium.git
synced 2025-03-01 14:22:32 +01:00
make sure autocomplete is closed when navigating to note
This commit is contained in:
parent
7c77ae758b
commit
a3951f1cce
@ -405,7 +405,7 @@ tabRow.addListener('tabRemove', async ({ detail }) => {
|
|||||||
|
|
||||||
if (tabContextToDelete) {
|
if (tabContextToDelete) {
|
||||||
// sometimes there are orphan autocompletes after closing the tab
|
// sometimes there are orphan autocompletes after closing the tab
|
||||||
tabContextToDelete.$tabContent.find('.aa-input').autocomplete('close');
|
tabContextToDelete.closeAutocomplete();
|
||||||
|
|
||||||
await tabContextToDelete.saveNoteIfChanged();
|
await tabContextToDelete.saveNoteIfChanged();
|
||||||
tabContextToDelete.$tabContent.remove();
|
tabContextToDelete.$tabContent.remove();
|
||||||
|
@ -109,6 +109,8 @@ class TabContext {
|
|||||||
|
|
||||||
this.setTitleBar();
|
this.setTitleBar();
|
||||||
|
|
||||||
|
this.closeAutocomplete(); // esp. on windows autocomplete is not getting closed automatically
|
||||||
|
|
||||||
setTimeout(async () => {
|
setTimeout(async () => {
|
||||||
// we include the note into recent list only if the user stayed on the note at least 5 seconds
|
// we include the note into recent list only if the user stayed on the note at least 5 seconds
|
||||||
if (notePath && notePath === this.notePath) {
|
if (notePath && notePath === this.notePath) {
|
||||||
@ -334,6 +336,10 @@ class TabContext {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
closeAutocomplete() {
|
||||||
|
this.$tabContent.find('.aa-input').autocomplete('close');
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
export default TabContext;
|
export default TabContext;
|
Loading…
x
Reference in New Issue
Block a user