WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
NEW
227474
history pushState and replaceState do not work if iframe src changed
https://bugs.webkit.org/show_bug.cgi?id=227474
Summary
history pushState and replaceState do not work if iframe src changed
richy.liu.2002
Reported
2021-06-28 19:44:46 PDT
Created
attachment 432448
[details]
minimal working example Calling history.pushState or history.replaceState in an iframe whose src was changed has no effect. These functions do work correctly when the iframe's src was not changed, or if they are not in an iframe at all. Calling pushState after the iframe loads but before the pushState in the iframe is called seems to fix the issue. To reproduce the issue, unzip the attached zip which contains index.html and embed.html. Open index.html. It will load embed.html into an iframe. Open the console and click 'push history' under 'frame 2 (src change)'. See that history.length does not change. Then click 'push history' under 'frame 1 (no src change)'. See that history.length does change. Replicated on Safari 14.1.1, latest WebKit (
r279353
), and iOS Safari on iOS 14.6. Firefox and Chrome do not have this issue.
Attachments
minimal working example
(867 bytes, application/zip)
2021-06-28 19:44 PDT
,
richy.liu.2002
no flags
Details
View All
Add attachment
proposed patch, testcase, etc.
Radar WebKit Bug Importer
Comment 1
2021-07-05 19:45:17 PDT
<
rdar://problem/80190653
>
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug