mirror of
https://github.com/home-assistant/frontend.git
synced 2025-07-22 16:56:35 +00:00
Set initial focus for device, area, and entity dialogs (#11622)
This commit is contained in:
parent
ed001fb10b
commit
4db943c5ff
@ -164,6 +164,7 @@ export class MoreInfoDialog extends LitElement {
|
|||||||
.label=${this.hass.localize(
|
.label=${this.hass.localize(
|
||||||
"ui.dialogs.more_info_control.details"
|
"ui.dialogs.more_info_control.details"
|
||||||
)}
|
)}
|
||||||
|
dialogInitialFocus
|
||||||
></mwc-tab>
|
></mwc-tab>
|
||||||
<mwc-tab
|
<mwc-tab
|
||||||
.label=${this.hass.localize(
|
.label=${this.hass.localize(
|
||||||
@ -174,7 +175,7 @@ export class MoreInfoDialog extends LitElement {
|
|||||||
`
|
`
|
||||||
: ""}
|
: ""}
|
||||||
</div>
|
</div>
|
||||||
<div class="content">
|
<div class="content" tabindex="-1" dialogInitialFocus>
|
||||||
${cache(
|
${cache(
|
||||||
this._currTabIndex === 0
|
this._currTabIndex === 0
|
||||||
? html`
|
? html`
|
||||||
|
@ -92,6 +92,7 @@ class DialogAreaDetail extends LitElement {
|
|||||||
"ui.panel.config.areas.editor.name_required"
|
"ui.panel.config.areas.editor.name_required"
|
||||||
)}
|
)}
|
||||||
.invalid=${nameInvalid}
|
.invalid=${nameInvalid}
|
||||||
|
dialogInitialFocus
|
||||||
></paper-input>
|
></paper-input>
|
||||||
<ha-picture-upload
|
<ha-picture-upload
|
||||||
.hass=${this.hass}
|
.hass=${this.hass}
|
||||||
|
@ -68,6 +68,7 @@ class DialogDeviceRegistryDetail extends LitElement {
|
|||||||
.label=${this.hass.localize("ui.panel.config.devices.name")}
|
.label=${this.hass.localize("ui.panel.config.devices.name")}
|
||||||
.placeholder=${device.name || ""}
|
.placeholder=${device.name || ""}
|
||||||
.disabled=${this._submitting}
|
.disabled=${this._submitting}
|
||||||
|
dialogInitialFocus
|
||||||
></paper-input>
|
></paper-input>
|
||||||
<ha-area-picker
|
<ha-area-picker
|
||||||
.hass=${this.hass}
|
.hass=${this.hass}
|
||||||
|
@ -115,6 +115,7 @@ export class DialogEntityEditor extends LitElement {
|
|||||||
.label=${this.hass.localize(
|
.label=${this.hass.localize(
|
||||||
"ui.dialogs.entity_registry.settings"
|
"ui.dialogs.entity_registry.settings"
|
||||||
)}
|
)}
|
||||||
|
dialogInitialFocus
|
||||||
>
|
>
|
||||||
</mwc-tab>
|
</mwc-tab>
|
||||||
${Object.entries(this._extraTabs).map(
|
${Object.entries(this._extraTabs).map(
|
||||||
|
Loading…
x
Reference in New Issue
Block a user