From 5bd41fc00c2ff061c2b30fcceb80cce242ae0199 Mon Sep 17 00:00:00 2001 From: Corinna Schmidt Date: Tue, 17 Sep 2013 16:01:45 -0400 Subject: [PATCH] Compatibility with jQuery 1.10 removeAttr("disabled') is no longer correct with the most recent version of jQuery. Should use prop("disabled", false) instead. --- select2.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/select2.js b/select2.js index 950f9d73..af0454a6 100644 --- a/select2.js +++ b/select2.js @@ -1854,7 +1854,7 @@ the specific language governing permissions and limitations under the Apache Lic this.parent.close.apply(this, arguments); params = params || {focus: true}; - this.focusser.removeAttr("disabled"); + this.focusser.prop("disabled", false); if (params.focus) { this.focusser.focus(); @@ -1866,7 +1866,7 @@ the specific language governing permissions and limitations under the Apache Lic if (this.opened()) { this.close(); } else { - this.focusser.removeAttr("disabled"); + this.focusser.prop("disabled", false); this.focusser.focus(); } }, @@ -1879,7 +1879,7 @@ the specific language governing permissions and limitations under the Apache Lic // single cancel: function () { this.parent.cancel.apply(this, arguments); - this.focusser.removeAttr("disabled"); + this.focusser.prop("disabled", false); this.focusser.focus(); },