Skip to content

Commit 5cf5deb

Browse files
committed
Fix placeholder missing on tab out on input tags
Tabbing out of input tags with multiple set as true and no value selected will result in the default placeholder not being shown. This patch fixes the issue by calling clearSearch() on blur of MultiSelect2 and preventing the bubbling of the blur event to the abstract class. Test case with version 3.2: http://jsfiddle.net/pmirshad/PqP2L/1/
1 parent 222fa7e commit 5cf5deb

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

select2.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1867,6 +1867,9 @@
18671867

18681868
this.search.bind("blur", this.bind(function() {
18691869
this.container.removeClass("select2-container-active");
1870+
this.search.removeClass("select2-focused");
1871+
this.clearSearch();
1872+
e.stopImmediatePropagation();
18701873
}));
18711874

18721875
this.container.delegate(selector, "mousedown", this.bind(function (e) {

0 commit comments

Comments
 (0)