Allow iframe links to open on android through a parameter#15063
Merged
Conversation
9 tasks
alanmilinovic
previously approved these changes
Jan 17, 2023
alanmilinovic
left a comment
There was a problem hiding this comment.
I tested the change and it is working fine.
|
Wow how much time is needed for a simple code review. |
Member
It is not perse the code review, more if we want to add this feature... |
bramkragten
reviewed
Jan 23, 2023
bramkragten
reviewed
Jan 23, 2023
bramkragten
reviewed
Jan 23, 2023
bramkragten
reviewed
Jan 23, 2023
Member
|
Please add a documentation PR for this option |
Contributor
Author
|
@bramkragten , I did not know we could set options via the code editor but not via the UI. |
This was referenced Jan 23, 2023
Contributor
Author
|
And finaly added the documentation PR also. |
bramkragten
approved these changes
Jan 24, 2023
|
Will this change be in a next release? Thank you. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Breaking change
None
Proposed change
Following the discussion in home-assistant/android#3044 and my previous PR in #14379, I propose the approach of adding the 'allow-top-navigation-by-user-activation' value for the sandbox's iframe attribute.
By default, it is not allowed and if the user chooses it, it is allowed.
So it resolves my initial problem of not being able to clic on the links of the iframe in my android device.
I tested it in developpement mode and it works well.
Type of change
Example configuration
Create an iframe card in lovelace with the following src url : https://www.programme-television.org/?no_layout=
Check or un check the new option and see in debug mode, the presence or absence of the sandbox="allow-top-navigation-by-user-activation" value.
Open it on your android device and clic on a link of the tv show : it opens correctly now in a tab of the default android browser.
Additional information
Checklist
If user exposed functionality or configuration variables are added/changed: