[Webkit-unassigned] [Bug 227474] New: history pushState and replaceState do not work if iframe src changed

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Mon Jun 28 19:44:46 PDT 2021


https://bugs.webkit.org/show_bug.cgi?id=227474

            Bug ID: 227474
           Summary: history pushState and replaceState do not work if
                    iframe src changed
           Product: WebKit
           Version: Safari 14
          Hardware: Mac (Apple Silicon)
                OS: macOS 11
            Status: NEW
          Severity: Normal
          Priority: P2
         Component: New Bugs
          Assignee: webkit-unassigned at lists.webkit.org
          Reporter: richy.liu.2002 at gmail.com

Created attachment 432448

  --> https://bugs.webkit.org/attachment.cgi?id=432448&action=review

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.

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20210629/618f2415/attachment-0001.htm>


More information about the webkit-unassigned mailing list