ui: autocomplete: fix styles & ensure key type (#191)

This commit is contained in:
无限UCW authored and GitHub committed 2021-08-24 12:30:52 +08:00
1 parent 79ec4d300c
commit fe36a3f17e
3 files changed
+7 -21

No files matched your search

@@ -20,6 +20,8 @@ export default class AutoComplete extends DOMAttachedObject {
this.onChange = this.onChange.bind(this);
this.container = document.createElement('div');
this.$dom.addClass('autocomplete-dummy').after(this.container);
// Note: use `setTimeout(fn, 0)` to ensure that code is executed after browser autofill
// also see https://stackoverflow.com/a/779785/13553984
setTimeout(() => this.attach(), 0);
}