mirror of
https://github.com/zadam/trilium.git
synced 2025-11-03 20:06:08 +01:00
Automatically trigger autocomplete on focus.
This commit is contained in:
@@ -84,6 +84,13 @@ export default class EmptyTypeWidget extends TypeWidget {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Automatically trigger autocomplete on focus.
|
||||||
|
this.$autoComplete.on('focus', () => {
|
||||||
|
// simulate pressing down arrow to trigger autocomplete
|
||||||
|
this.$autoComplete.trigger($.Event('keydown', { which: 40 })); // arrow down
|
||||||
|
this.$autoComplete.trigger($.Event('keydown', { which: 38 })); // arrow up
|
||||||
|
});
|
||||||
|
|
||||||
this.$autoComplete
|
this.$autoComplete
|
||||||
.trigger('focus')
|
.trigger('focus')
|
||||||
.trigger('select');
|
.trigger('select');
|
||||||
|
|||||||
Reference in New Issue
Block a user