Skip to content

hui-iframe-card / panel_iframe should get same height fix as #29681 — iframe collapses on iOS Companion #52049

@dalvonc

Description

@dalvonc

Checklist

  • I have updated to the latest available Home Assistant version.
  • I have cleared the cache of my browser.
  • I have tried a different browser to see if it is related to my browser.
  • I have tried reproducing the issue in safe mode to rule out problems with unsupported custom resources.

Describe the issue you are experiencing

hui-iframe-card and panel_iframe show the same iframe height-collapse symptom that was fixed for ha-panel-custom in PR #29681, but the fix was not applied to these components.

Symptom: After multiple Home Assistant iOS Companion app open/close cycles, the iframe collapses to ~1/3 of screen height. The top portion (header + first card) renders correctly. The bottom portion shows an unusable empty/grey area until the HA tab bar.

This is the same visual symptom reported in #28868 ("unusable grey margin at the bottom"), which was closed by #29681 — but #29681 only modified src/panels/custom/ha-panel-custom.ts.

Direct iOS Safari access works fine. Android HA Companion works fine. ONLY iOS HA Companion exhibits the bug.

Related:

Describe the behavior you expected

Apply the same height: 100vh; height: 100dvh; dual-fallback fix from #29681 to:

  • src/panels/iframe/ha-panel-iframe.ts (legacy panel_iframe YAML)
  • src/panels/lovelace/cards/hui-iframe-card.ts (used by Webpage Dashboard since 2024.4)

The iframe should fill 100dvh consistently on iOS Companion regardless of WKWebView lifecycle events. Many users embed React/Vue SPAs via panel_iframe (Frigate before Ingress, custom dashboards, third-party apps) and should get the same baseline as custom panel users.

Steps to reproduce the issue

  1. Configure a panel_iframe via YAML pointing to any React SPA, or add a webpage card via Webpage Dashboard
    Example:
    panel_iframe:
    myapp:
    title: "My App"
    url: "https://my-react-spa.example.com/"

  2. On iPhone (iOS 26) with HA iOS Companion app installed:

    • Open the iframe panel
    • Tap home button to background HA app
    • Foreground HA app from app switcher
    • Repeat background/foreground 10-20 times rapidly
  3. At some point iframe shrinks to ~1/3 height. Top of SPA renders correctly but bottom is empty grey/black area.

  4. Verify it does NOT happen:

    • Direct iOS Safari to same URL: works fine
    • Android HA Companion: works fine
    • Desktop browser: works fine

Tested with HA Core 2026.4.2, Frontend 20260325.7, HA Companion iOS latest, iPhone iOS 26.

What version of Home Assistant Core has the issue?

2026.4.2 (Container) — Frontend 20260325.7

What was the last working version of Home Assistant Core?

No response

In which browser are you experiencing the issue?

No response

Which operating system are you using to run this browser?

No response

State of relevant entities

Problem-relevant frontend configuration

JavaScript errors shown in your browser console/inspector

Additional information

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Priority

    None yet

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions