ampproject / ampproject/amphtml

Navigation of top window from within iframe doesn't work in IOS

Open
#34,934 19 comments 0 reactions 0 assignees View on GitHub
Stale Type: Bug
Dominant language
JavaScript
Stars
14.9k
Forks
4.1k
PR merge metrics
No merged PRs in 30d

Description

### Description

When viewing an AMP page from the Google search results on IOS, navigating the top window from within iframes does not work, as if the 'allow-top-navigation' permission is not set (and it is).
This only happens in IOS, when viewing AMP pages from the Google search results app (not via the browser).
Tested on several iphones.

### Reproduction Steps

1. Use an iphone, and open the Google Search app (not via the browser)
2. search the term (apologies for the language) "אשת מלונות בארץ"
3. open the top most AMP result.
4. In the opened page, make some selections. [See screenshot for instructions](https://user-images.githubusercontent.com/25805938/122719492-ea12b300-d276-11eb-8ed0-72f0d2d96756.png).
5. Click the blue button.

**Result**: Nothing happens.
**Expected result** the top page should have been redirected to a different URL (see how the same page behaves on other browsers: https://www.google.com/amp/s/www.eshet.com/domestichotels/amp/)

Video of the issue: https://drive.google.com/file/d/1M_iQkQVLm_4I1mZN4oY4UR4u6hWWAsu0/view?usp=sharing

### Relevant Logs

_No response_

### Browser(s) Affected

_No response_

### OS(s) Affected

IOS15

### Device(s) Affected

All iphones

### AMP Version Affected

_No response_

Contributor guide

Open the contributing guide

Research direction

No source file or test is named. Start by reproducing the redirect failure using the Google Search app on an iPhone with the listed AMP page, then compare its top-window navigation with other browsers. Done means the blue button redirects the top page to the expected URL on iOS.

Written by the indexing model from the issue text.

Assessment

Tech stack
ios, javascript
Domain
frontend, web-dev
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.