fix: preserve the ordinary dialog path

Issue: #406
User-Visible: no
This commit is contained in:
Sergey Matyunin
2026-09-01 19:17:36 +03:00
parent 5d2f29572f
commit d5f050fdd3
19 changed files with 284 additions and 245 deletions
+16 -1
View File
@@ -450,13 +450,28 @@ export class HpDialog extends LitElement {
</span>`;
if (this._usesHaDialog()) {
if (this.describedBy) {
return html`<ha-dialog
.hass=${this.hass}
.open=${true}
width=${this.wide ? 'medium' : 'small'}
.preventScrimClose=${!this.dismissOnScrim}
.ariaLabelledBy=${this._titleId}
.ariaDescribedBy=${this.describedBy}
@opened=${this._focusInitial}
@closed=${this._requestClose}
>
<span class="header-title-slot" slot="headerTitle">${title}</span>
<slot></slot>
<span class="footer" slot="footer"><slot name="footer"></slot></span>
</ha-dialog><div class="overlay-portal"></div>`;
}
return html`<ha-dialog
.hass=${this.hass}
.open=${true}
width=${this.wide ? 'medium' : 'small'}
.preventScrimClose=${!this.dismissOnScrim}
.ariaLabelledBy=${this._titleId}
.ariaDescribedBy=${this.describedBy || undefined}
@opened=${this._focusInitial}
@closed=${this._requestClose}
>