Issue 234368 for the Chromium project is fixed now (Issue #1099)
This commit is contained in:
parent
6156abc2a8
commit
f9be3c039c
13
select2.js
13
select2.js
@ -829,8 +829,6 @@ the specific language governing permissions and limitations under the Apache Lic
|
|||||||
if (this.propertyObserver) {
|
if (this.propertyObserver) {
|
||||||
this.propertyObserver.disconnect();
|
this.propertyObserver.disconnect();
|
||||||
this.propertyObserver = null;
|
this.propertyObserver = null;
|
||||||
|
|
||||||
this.mutationCallback = null;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (select2 !== undefined) {
|
if (select2 !== undefined) {
|
||||||
@ -1096,18 +1094,13 @@ the specific language governing permissions and limitations under the Apache Lic
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
// hold onto a reference of the callback to work around a chromium bug
|
|
||||||
if (this.mutationCallback === undefined) {
|
|
||||||
this.mutationCallback = function (mutations) {
|
|
||||||
mutations.forEach(sync);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// safari, chrome, firefox, IE11
|
// safari, chrome, firefox, IE11
|
||||||
observer = window.MutationObserver || window.WebKitMutationObserver|| window.MozMutationObserver;
|
observer = window.MutationObserver || window.WebKitMutationObserver|| window.MozMutationObserver;
|
||||||
if (observer !== undefined) {
|
if (observer !== undefined) {
|
||||||
if (this.propertyObserver) { delete this.propertyObserver; this.propertyObserver = null; }
|
if (this.propertyObserver) { delete this.propertyObserver; this.propertyObserver = null; }
|
||||||
this.propertyObserver = new observer(this.mutationCallback);
|
this.propertyObserver = new observer(function (mutations) {
|
||||||
|
mutations.forEach(sync);
|
||||||
|
});
|
||||||
this.propertyObserver.observe(el.get(0), { attributes:true, subtree:false });
|
this.propertyObserver.observe(el.get(0), { attributes:true, subtree:false });
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
Loading…
x
Reference in New Issue
Block a user