From 533694391e5a3c179dbf173ae4ccf4f214285478 Mon Sep 17 00:00:00 2001 From: Bram Kragten Date: Tue, 6 Jan 2026 13:45:21 +0100 Subject: [PATCH] Remove iOS focus handling from dialogs (#28818) --- src/components/ha-wa-dialog.ts | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/src/components/ha-wa-dialog.ts b/src/components/ha-wa-dialog.ts index d9bdb57f44..3b95e4aa3d 100644 --- a/src/components/ha-wa-dialog.ts +++ b/src/components/ha-wa-dialog.ts @@ -13,7 +13,6 @@ import { fireEvent } from "../common/dom/fire_event"; import { ScrollableFadeMixin } from "../mixins/scrollable-fade-mixin"; import { haStyleScrollbar } from "../resources/styles"; import type { HomeAssistant } from "../types"; -import { isIosApp } from "../util/is_ios"; import "./ha-dialog-header"; import "./ha-icon-button"; @@ -185,21 +184,22 @@ export class HaWaDialog extends ScrollableFadeMixin(LitElement) { await this.updateComplete; requestAnimationFrame(() => { - if (isIosApp(this.hass)) { - const element = this.querySelector("[autofocus]"); - if (element !== null) { - if (!element.id) { - element.id = "ha-wa-dialog-autofocus"; - } - this.hass.auth.external!.fireMessage({ - type: "focus_element", - payload: { - element_id: element.id, - }, - }); - } - return; - } + // temporary disabled because of issues with focus in iOS app, can be reenabled in 2026.2.0 + // if (isIosApp(this.hass)) { + // const element = this.querySelector("[autofocus]"); + // if (element !== null) { + // if (!element.id) { + // element.id = "ha-wa-dialog-autofocus"; + // } + // this.hass.auth.external!.fireMessage({ + // type: "focus_element", + // payload: { + // element_id: element.id, + // }, + // }); + // } + // return; + // } (this.querySelector("[autofocus]") as HTMLElement | null)?.focus(); }); };