Bug 209753
| Summary: | `pushState` and `back` trigger page reloading when called in iframe | ||
|---|---|---|---|
| Product: | WebKit | Reporter: | Ivan Nedzvetskiy <stels-cs> |
| Component: | History | Assignee: | Nobody <webkit-unassigned> |
| Status: | NEW | ||
| Severity: | Normal | CC: | achristensen, beidson, webkit-bug-importer |
| Priority: | P2 | Keywords: | InRadar |
| Version: | Safari 13 | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
Ivan Nedzvetskiy
Reproducible script that can be ran on https://test.dev1.hsstore.ru/safari/
What happened:
When an `iframe` calls `window.history.pushState` and then `window.history.back`, the parent window's reloading.
It happens only if we create iframe on the parent window and remove it before creating app iframe with history manipulation.
Expected behavior:
Fire event `popstate` without reload.
Steps to reproduce:
1. Create iframe, add to DOM on parent page
2. Remove iframe from DOM on parent page
3. Create another iframe, load some app in it on parent page
4. In an app iframe, call `window.history.pushState(...)`
5. In an app iframe, call `window.history.back(...)`
6. Got reload instead of expected popstate event
Demo:
1. Go https://test.dev1.hsstore.ru/safari/
2. Click pushState
3. Click back
4. Got reload
| Attachments | ||
|---|---|---|
| Add attachment proposed patch, testcase, etc. |
Radar WebKit Bug Importer
<rdar://problem/61069867>