2
0
mirror of https://github.com/tenrok/vue-select.git synced 2026-05-17 02:29:37 +03:00

Improved fix for unresponsive vue-select after clicking custom no-options to not reintroduce old IE bug (#703)

This commit is contained in:
Marek Meyer
2018-11-17 11:45:57 +01:00
parent 17c06c08b0
commit cacacfc5a8
+22 -4
View File
@@ -969,11 +969,29 @@
* @return {void}
*/
onSearchBlur() {
this.mousedown = false
if (this.clearSearchOnBlur) {
this.search = ''
if (this.mousedown && !this.searching) {
this.mousedown = false
} else {
if (this.clearSearchOnBlur) {
this.search = ''
}
this.closeSearchOptions()
}
// Fixed bug where no-options message could not be closed
if(this.search.length === 0 && this.options.length === 0){
this.closeSearchOptions()
}
},
/**
* 'Private' function to close the search options
* @emits {search:blur}
* @returns {void}
*/
closeSearchOptions(){
this.open = false
this.$emit('search:blur')
},