Skip to content

armgit / core

Public Imported from GitHub
0

100% open-source IoT Platform - Integrate your devices, add intelligence, build custom apps

UI update: or-mwc-dialog focus on open to prevent error in console (#652)

vlichtenberg7d3d01bce9de
diff --git a/ui/component/or-mwc-components/src/or-mwc-dialog.ts b/ui/component/or-mwc-components/src/or-mwc-dialog.ts
index c9d9525ee..63b67fbb0 100644
--- a/ui/component/or-mwc-components/src/or-mwc-dialog.ts
+++ b/ui/component/or-mwc-components/src/or-mwc-dialog.ts
@@ -278,7 +278,7 @@ export class OrMwcDialog extends LitElement {
@MDCDialog:opened="${() => this._onDialogOpened()}"
@MDCDialog:closed="${(evt: any) => this._onDialogClosed(evt.detail.action)}">
<div class="mdc-dialog__container">
- <div class="mdc-dialog__surface">
+ <div class="mdc-dialog__surface" tabindex="0">
${typeof(this.heading) === "string" ? html`<h2 class="mdc-dialog__title" id="dialog-title"><or-translate value="${this.heading}"></or-translate></h2>`
: this.heading ? html`<span class="mdc-dialog__title" id="dialog-title">${this.heading}</span>` : ``}
${this.content ? html`