We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 8d5774a + c65c450 commit f6e12baCopy full SHA for f6e12ba
dialog-polyfill.js
@@ -58,11 +58,13 @@
58
dialog.returnValue = '';
59
}
60
61
+ this.maybeHideModal = this.maybeHideModal.bind(this);
62
if ('MutationObserver' in window) {
- var mo = new MutationObserver(this.maybeHideModal.bind(this));
63
+ // IE11+, most other browsers.
64
+ var mo = new MutationObserver(this.maybeHideModal);
65
mo.observe(dialog, { attributes: true, attributeFilter: ['open'] });
66
} else {
- // TODO: Support for IE9-10.
67
+ dialog.addEventListener('DOMAttrModified', this.maybeHideModal);
68
69
// Note that the DOM is observed inside DialogManager while any dialog
70
// is being displayed as a modal, to catch modal removal from the DOM.
0 commit comments