diff --git a/src/Autosuggest.vue b/src/Autosuggest.vue index 31b71c3..571f709 100644 --- a/src/Autosuggest.vue +++ b/src/Autosuggest.vue @@ -348,13 +348,19 @@ export default { updateCurrentIndex(index) { this.currentIndex = index; }, - onDocumentMouseUp() { + onDocumentMouseUp(e) { /** Clicks outside of dropdown to exit */ if (this.currentIndex === null || !this.isOpen) { this.loading = this.shouldRenderSuggestions(); return; } + /** Do not re-render list on input click */ + const isChild = this.$el.contains(e.target); + if (isChild && e.target.tagName === 'INPUT') { + return; + } + /** Selects an item in the dropdown */ this.loading = true; this.didSelectFromOptions = true;