1
0
mirror of synced 2025-03-10 22:56:12 +03:00

no longer need to blur in a settimeout because dropdown and searchfield are now detached. possibly fixes #132

This commit is contained in:
Igor Vaynberg 2012-06-20 17:28:26 -07:00
parent 2343572a25
commit 4819d42f85

View File

@ -935,16 +935,11 @@
},
blur: function () {
/* we do this in a timeout so that current event processing can complete before this code is executed.
this allows tab index to be preserved even if this code blurs the textfield */
window.setTimeout(this.bind(function () {
this.close();
this.container.removeClass("select2-container-active");
this.dropdown.removeClass("select2-drop-active");
this.clearSearch();
this.selection.find(".select2-search-choice-focus").removeClass("select2-search-choice-focus");
this.search.blur();
}), 10);
this.close();
this.container.removeClass("select2-container-active");
this.dropdown.removeClass("select2-drop-active");
this.clearSearch();
this.selection.find(".select2-search-choice-focus").removeClass("select2-search-choice-focus");
},
focusSearch: function () {