We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 0d98939 commit 78526a3Copy full SHA for 78526a3
1 file changed
select2.js
@@ -836,13 +836,13 @@ the specific language governing permissions and limitations under the Apache Lic
836
837
// abstract
838
destroy: function () {
839
- var element=this.opts.element, select2 = element.data("select2");
+ var element=this.opts.element, select2 = element.data("select2"), self = this;
840
841
this.close();
842
843
if (element.length && element[0].detachEvent) {
844
element.each(function () {
845
- this.detachEvent("onpropertychange", this._sync);
+ this.detachEvent("onpropertychange", self._sync);
846
});
847
}
848
if (this.propertyObserver) {
0 commit comments