Skip to content

Commit

Permalink
Fix polyfill handleOpen in ha-md-dialog
Browse files Browse the repository at this point in the history
  • Loading branch information
wendevlin committed Sep 16, 2024
1 parent 5df1580 commit 69e85f2
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 deletions src/components/ha-md-dialog.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,14 +37,10 @@ export class HaMdDialog extends MdDialog {
}
}

// prevent open in older browsers and wait for polyfill to load
private async _handleOpen(openEvent: Event) {
// prevent open in older browsers and wait for polyfill to load
if (
typeof HTMLDialogElement !== "function" &&
!this._polyfillDialogRegistered
) {
openEvent.preventDefault();

openEvent.preventDefault();
if (!this._polyfillDialogRegistered) {
this._loadPolyfillStylesheet("/static/polyfills/dialog-polyfill.css");
const dialog = this.shadowRoot?.querySelector(
"dialog"
Expand Down

0 comments on commit 69e85f2

Please sign in to comment.