Skip to content

Commit

Permalink
Fix ha-md-dialog for iOS 12
Browse files Browse the repository at this point in the history
  • Loading branch information
wendevlin committed Sep 12, 2024
1 parent e6b2010 commit a07a2a0
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/components/ha-md-dialog.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,6 @@ export class HaMdDialog extends MdDialog {
if (typeof HTMLDialogElement === "function") {
this.open = true;
}

// handle unsupported animations
if (this.shadowRoot?.querySelector("dialog")?.animate === undefined) {
this.quick = true; // disables animations for open/close
}
}

async connectedCallback() {
Expand All @@ -40,6 +35,11 @@ export class HaMdDialog extends MdDialog {
await this._loadStylesheet("/static/polyfills/dialog-polyfill.css");
this.open = true;
}

// disable dialog animations on older browsers
if (this.animate === undefined) {
this.quick = true;
}
}

private async _loadStylesheet(href) {
Expand Down

0 comments on commit a07a2a0

Please sign in to comment.