mirror of
https://github.com/home-assistant/frontend.git
synced 2025-11-09 19:09:48 +00:00
Fix pickers not getting focus (#14068)
* fix focus pickers * await nextRender instead of setTimeout * use bram's code * Update src/components/ha-target-picker.ts Co-authored-by: Steve Repsher <steverep@users.noreply.github.com> Co-authored-by: Steve Repsher <steverep@users.noreply.github.com>
This commit is contained in:
@@ -251,10 +251,8 @@ export class HaTargetPicker extends SubscribeMixin(LitElement) {
|
||||
private async _showPicker(ev) {
|
||||
this._addMode = ev.currentTarget.type;
|
||||
await this.updateComplete;
|
||||
setTimeout(() => {
|
||||
this._inputElement?.open();
|
||||
this._inputElement?.focus();
|
||||
}, 0);
|
||||
await this._inputElement?.focus();
|
||||
await this._inputElement?.open();
|
||||
}
|
||||
|
||||
private _renderChip(
|
||||
|
||||
Reference in New Issue
Block a user