From 78526a3860453773a3f70f0633aa2770b5e423a3 Mon Sep 17 00:00:00 2001 From: Vitaliy Ryaboy Date: Tue, 17 Jun 2014 13:47:31 +0200 Subject: [PATCH] Update select2.js fixed destroy --- select2.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/select2.js b/select2.js index cae42c20..68ed8d34 100644 --- a/select2.js +++ b/select2.js @@ -836,13 +836,13 @@ the specific language governing permissions and limitations under the Apache Lic // abstract destroy: function () { - var element=this.opts.element, select2 = element.data("select2"); + var element=this.opts.element, select2 = element.data("select2"), self = this; this.close(); if (element.length && element[0].detachEvent) { element.each(function () { - this.detachEvent("onpropertychange", this._sync); + this.detachEvent("onpropertychange", self._sync); }); } if (this.propertyObserver) {