File tree Expand file tree Collapse file tree 1 file changed +22
-4
lines changed Expand file tree Collapse file tree 1 file changed +22
-4
lines changed Original file line number Diff line number Diff line change 969
969
* @return {void}
970
970
*/
971
971
onSearchBlur () {
972
-
973
- this .mousedown = false
974
- if (this .clearSearchOnBlur ) {
975
- this .search = ' '
972
+
973
+ if (this .mousedown && ! this .searching ) {
974
+ this .mousedown = false
975
+ } else {
976
+ if (this .clearSearchOnBlur ) {
977
+ this .search = ' '
978
+ }
979
+ this .closeSearchOptions ()
980
+ }
981
+
982
+ // Fixed bug where no-options message could not be closed
983
+ if (this .search .length === 0 && this .options .length === 0 ){
984
+ this .closeSearchOptions ()
976
985
}
986
+
987
+ },
988
+
989
+ /**
990
+ * 'Private' function to close the search options
991
+ * @emits {search:blur}
992
+ * @returns {void}
993
+ */
994
+ closeSearchOptions (){
977
995
this .open = false
978
996
this .$emit (' search:blur' )
979
997
},
You can’t perform that action at this time.
0 commit comments