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:
@@ -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')
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user