Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merge in v1.29.5 #1119

Merged
merged 4 commits into from
Dec 15, 2022
Merged

Merge in v1.29.5 #1119

merged 4 commits into from
Dec 15, 2022

Conversation

tmeyer2115
Copy link
Collaborator

No description provided.

oshi97 and others added 4 commits December 12, 2022 12:54
Previously, iframe.js would not work with links contains hash URLs, i.e. links like

```html
<a id="skip-to-content-link" href="#main-content">Skip to content</a>
```

notice the URL starts with a hashtag. These links are different than normal HTML links,
in that instead of redirecting to a new page, they will scroll the browser down to the element
with the id matching the link. For the example above, it would scroll down to an element like

```html
<div id="main-content">main content!</div>
```

However, iframe.js has an issue where, when one of these links are clicked, the iframe.js will reload
and the parent frame's URL will be changed.
This issue was caused by the following process:
1. iframe.js's has a window.popstate listener, which reloads the iframe
whenever a popstate event was triggered (for instance by clicking on one of these links),
2. clicking a hash link will trigger this listener, reloading the iframe
3. reloading the iframe causes the inner iframe to send messages to the outer frame
4. these messages are received by iframe.js's onMessage listener, which then performs a history.replaceState (for certain types of messages)

To avoid this situation, this PR updates the popstate listener to be a no-op if the new URL of the page is the same as the old one, ignoring any hash URLs

J=TECHOPS-7401
TEST=manual

ran the theme's test site, created a basic iframe implementation
before this change, hash urls would have the broken behavior
after the change, they would scroll down the page without reloading the iframe or changing the parent's URL
Now that the Google Maps JS API has dropped support for IE11, Browserstack acceptance tests on IE11 fail. This PR updates the Browserstack acceptance workflow to only run the jobs on Safari and Firefox, and not on IE11 anymore. The `IE11NoCacheHook` is also removed as it's no longer needed.

J=SLAP-2502
TEST=auto

See that there are only Browserstack checks for Safari and Firefox on the `Test` commit in this PR and neither has Google Maps API errors.
* fix iframe.js not working with hash URL links (#1115)
@coveralls
Copy link

Coverage Status

Coverage decreased (-0.007%) to 8.743% when pulling 777b5cd on hotfix/v1.29.5 into f8620fc on release/v1.30.

@tmeyer2115 tmeyer2115 merged commit 1ee4dcf into release/v1.30 Dec 15, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants