Skip to content

Commit f9be3c0

Browse files
author
Justin Lei
committed
Issue 234368 for the Chromium project is fixed now (Issue select2#1099)
1 parent 6156abc commit f9be3c0

1 file changed

Lines changed: 3 additions & 10 deletions

File tree

select2.js

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -829,8 +829,6 @@ the specific language governing permissions and limitations under the Apache Lic
829829
if (this.propertyObserver) {
830830
this.propertyObserver.disconnect();
831831
this.propertyObserver = null;
832-
833-
this.mutationCallback = null;
834832
}
835833

836834
if (select2 !== undefined) {
@@ -1096,18 +1094,13 @@ the specific language governing permissions and limitations under the Apache Lic
10961094
});
10971095
}
10981096

1099-
// hold onto a reference of the callback to work around a chromium bug
1100-
if (this.mutationCallback === undefined) {
1101-
this.mutationCallback = function (mutations) {
1102-
mutations.forEach(sync);
1103-
}
1104-
}
1105-
11061097
// safari, chrome, firefox, IE11
11071098
observer = window.MutationObserver || window.WebKitMutationObserver|| window.MozMutationObserver;
11081099
if (observer !== undefined) {
11091100
if (this.propertyObserver) { delete this.propertyObserver; this.propertyObserver = null; }
1110-
this.propertyObserver = new observer(this.mutationCallback);
1101+
this.propertyObserver = new observer(function (mutations) {
1102+
mutations.forEach(sync);
1103+
});
11111104
this.propertyObserver.observe(el.get(0), { attributes:true, subtree:false });
11121105
}
11131106
},

0 commit comments

Comments
 (0)