| Summary: | Parent window's `history.state` is set to `null` when `history.pushState` is called by a child iframe | ||||||||
|---|---|---|---|---|---|---|---|---|---|
| Product: | WebKit | Reporter: | Atticus White <contact> | ||||||
| Component: | History | Assignee: | Nobody <webkit-unassigned> | ||||||
| Status: | NEW --- | ||||||||
| Severity: | Normal | CC: | achristensen, ahmad.saleem792, beidson, brazauskasjustas+webkit, cdumez, webkit-bug-importer, wilander, youennf | ||||||
| Priority: | P2 | Keywords: | BrowserCompat, InRadar, WPTImpact | ||||||
| Version: | Safari 12 | ||||||||
| Hardware: | Mac | ||||||||
| OS: | macOS 10.14 | ||||||||
| URL: | http://wpt.live/html/browsers/history/joint-session-history/joint-session-history-iframe-state.html | ||||||||
| Attachments: |
|
||||||||
Created attachment 367580 [details]
Sample output of reproducible steps
Attached example output of the reproducible script being ran on Safari (undesired result) and Chrome (desired result)
*** Bug 196989 has been marked as a duplicate of this bug. *** Additionally, a test case was submitted to https://github.com/web-platform-tests/wpt/pull/16381, which can also be used to reproduce this case. Additionally, it appears that this is also the behavior in Safari TP release 79. |
Created attachment 367579 [details] Reproducible script that can be ran on bugs.webkit.org What happened: When an `iframe` calls `window.history.pushState`, the parent window's `window.history.state` becomes replaced with a `null` value. Expected behavior: The top page's `history.state` should remain untouched. Steps to reproduce: 1. Give the top page a `history.state` value (eg, call `window.history.pushState({something}, 'something')`) 2. In an iframe, perform `window.history.pushState(...)` 3. In the top page, observe that `history.state` has become set to `null` Attached is a minimal working example of the problem that can be ran in the JS console on `bugs.webkit.org`