Open iframe content external link correctly on android
See original GitHub issueHome Assistant Android version: Latest beta version of Home Assistant App.
Android version: 12
Phone model: Samsung Galaxy S10
Home Assistant version: 2022.11.1
Last working Home Assistant release (if known):
Description of problem: I use HomeAssistant with a card of type iframe to display my TV guide in a tab in a board. Here is the configuration of the card :
type: iframe
url: https://www.programme-television.org/?no_layout=
aspect_ratio: 50%
It works great to display the TV guide on the browser and the android app.
But if I clic on a link of the page, in the android app, nothing happens. In the browser, the link is displayed in a new tab.
What would be great for the android app, I see two options :
- open the content in the homeassistant app replacing the content of the iframe.
- open the content in the android default browser, as in the desktop version.
I would prefer the option one but there may be some technical elements in the good solution.
Traceback (if applicable, to get the logs you may refer to: https://companion.home-assistant.io/docs/troubleshooting/faqs/#android-crash-logs):
Screenshot of problem: Nothing to show. The problem is easy to reproduce.
Additional information: N/A.
Issue Analytics
- State:
- Created 10 months ago
- Comments:13 (8 by maintainers)
Top GitHub Comments
Not mixed content related, I get a similar error when loading my server with https
Testing with the provided iframe URL shows the following console error for me:
Unsafe attempt to initiate navigation for frame with URL 'http://ha/iframe-test/0' from frame with URL 'https://www.programme-television.org/?no_layout='. The frame attempting navigation of the top-level window is sandboxed, but the flag of 'allow-top-navigation' or 'allow-top-navigation-by-user-activation' is not set.
Which, if I understand it correctly, is an intentional security feature, so I’m not sure why it behaves differently when using a browser. Maybe it is still allowed because it expects there to be a address bar/navigation UI in the browser but not when using a webview?