Skip to content

Commit 4819d42

Browse files
committed
no longer need to blur in a settimeout because dropdown and searchfield are now detached. possibly fixes select2#132
1 parent 2343572 commit 4819d42

1 file changed

Lines changed: 5 additions & 10 deletions

File tree

select2.js

Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -935,16 +935,11 @@
935935
},
936936

937937
blur: function () {
938-
/* we do this in a timeout so that current event processing can complete before this code is executed.
939-
this allows tab index to be preserved even if this code blurs the textfield */
940-
window.setTimeout(this.bind(function () {
941-
this.close();
942-
this.container.removeClass("select2-container-active");
943-
this.dropdown.removeClass("select2-drop-active");
944-
this.clearSearch();
945-
this.selection.find(".select2-search-choice-focus").removeClass("select2-search-choice-focus");
946-
this.search.blur();
947-
}), 10);
938+
this.close();
939+
this.container.removeClass("select2-container-active");
940+
this.dropdown.removeClass("select2-drop-active");
941+
this.clearSearch();
942+
this.selection.find(".select2-search-choice-focus").removeClass("select2-search-choice-focus");
948943
},
949944

950945
focusSearch: function () {

0 commit comments

Comments
 (0)