diff --git a/src/panels/lovelace/editor/dashboard-strategy-editor/dialogs/dialog-dashboard-strategy-editor.ts b/src/panels/lovelace/editor/dashboard-strategy-editor/dialogs/dialog-dashboard-strategy-editor.ts index 0677d8e1f0..ab9ad65505 100644 --- a/src/panels/lovelace/editor/dashboard-strategy-editor/dialogs/dialog-dashboard-strategy-editor.ts +++ b/src/panels/lovelace/editor/dashboard-strategy-editor/dialogs/dialog-dashboard-strategy-editor.ts @@ -226,8 +226,14 @@ class DialogDashboardStrategyEditor extends LitElement { css` ha-dialog { --dialog-content-padding: 0 24px; - --mdc-dialog-min-width: min(640px, calc(100% - 32px)); - --mdc-dialog-max-width: min(640px, calc(100% - 32px)); + --mdc-dialog-min-width: min( + 640px, + calc(100vw - 32px - var(--safe-area-inset-x)) + ); + --mdc-dialog-max-width: min( + 640px, + calc(100vw - 32px - var(--safe-area-inset-x)) + ); --mdc-dialog-max-height: calc(100% - 80px); }