|
@@ -1016,9 +1016,16 @@ S2.define('select2/results',[
|
|
|
'aria-selected': 'false'
|
|
|
};
|
|
|
|
|
|
- var matches = window.Element.prototype.matches ||
|
|
|
- window.Element.prototype.msMatchesSelector ||
|
|
|
- window.Element.prototype.webkitMatchesSelector;
|
|
|
+ var matches = Element.prototype.matchesSelector ||
|
|
|
+ Element.prototype.mozMatchesSelector ||
|
|
|
+ Element.prototype.msMatchesSelector ||
|
|
|
+ Element.prototype.oMatchesSelector ||
|
|
|
+ Element.prototype.webkitMatchesSelector || function(s) {
|
|
|
+ var matches = (this.document || this.ownerDocument).querySelectorAll(s),
|
|
|
+ i = matches.length;
|
|
|
+ while (--i >= 0 && matches.item(i) !== this) {}
|
|
|
+ return i > -1;
|
|
|
+ };
|
|
|
|
|
|
if ((data.element != null && matches.call(data.element, ':disabled')) ||
|
|
|
(data.element == null && data.disabled)) {
|