1
0
mirror of synced 2024-11-23 05:26:10 +03:00

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.
This commit is contained in:
Fabrice Daugan 2014-04-02 14:03:01 +02:00
parent df7b7ba95c
commit dd6198a3fa

View File

@ -2583,8 +2583,7 @@ the specific language governing permissions and limitations under the Apache Lic
this.selection = selection = this.container.find(selector); this.selection = selection = this.container.find(selector);
var _this = this; var _this = this;
this.selection.on("click", ".select2-search-choice:not(.select2-locked)", function (e) { this.selection.on("click", ".select2-container:not(.select2-container-disabled) .select2-search-choice:not(.select2-locked)", function (e) {
//killEvent(e);
_this.search[0].focus(); _this.search[0].focus();
_this.selectChoice($(this)); _this.selectChoice($(this));
}); });