Skip to content

Commit dd6198a

Browse files
committed
Ignore focus and error on IE7 for disabled select2
For disabled components, focus event was triggered. On modern browser this error was ignored but not on IE7. This PR save weird focus event and IE7 JS error.
1 parent df7b7ba commit dd6198a

1 file changed

Lines changed: 1 addition & 2 deletions

File tree

select2.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2583,8 +2583,7 @@ the specific language governing permissions and limitations under the Apache Lic
25832583
this.selection = selection = this.container.find(selector);
25842584

25852585
var _this = this;
2586-
this.selection.on("click", ".select2-search-choice:not(.select2-locked)", function (e) {
2587-
//killEvent(e);
2586+
this.selection.on("click", ".select2-container:not(.select2-container-disabled) .select2-search-choice:not(.select2-locked)", function (e) {
25882587
_this.search[0].focus();
25892588
_this.selectChoice($(this));
25902589
});

0 commit comments

Comments
 (0)