Explorar el Código

improve whitespace detection

Igor Vaynberg hace 13 años
padre
commit
9c4a4d1b8a
Se han modificado 1 ficheros con 1 adiciones y 1 borrados
  1. 1 1
      select2.js

+ 1 - 1
select2.js

@@ -476,7 +476,7 @@
 
             installKeyUpChangeEvent(search);
             search.bind("keyup-change", this.bind(this.updateResults));
-            search.bind("focus", function () { search.addClass("select2-focused"); search.val(""); });
+            search.bind("focus", function () { search.addClass("select2-focused"); if (search.val() === " ") search.val(""); });
             search.bind("blur", function () { search.removeClass("select2-focused");});
 
             this.dropdown.delegate(resultsSelector, "click", this.bind(function (e) {