Bug 223439 - location.assign("#foo") in the hashchange event listener of iframes went wrong
Summary: location.assign("#foo") in the hashchange event listener of iframes went wrong
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: Frames (show other bugs)
Version: Safari 14
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2021-03-18 05:01 PDT by Toru Nagashima
Modified: 2023-12-30 05:22 PST (History)
5 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Toru Nagashima 2021-03-18 05:01:27 PDT
Repro: https://github.com/mysticatea/webkit-test

I have checked it on Webkit 14.1 on Windows 10 (by playwright) and on Safari 13.1.2 on macOS 10.13.6.

In the repro, two pages exist:

- index.html
- iframe.html

`location.assign("#bar")` in index.html is expected to change the URL to `index.html#bar`.
However, in Webkit, it changed the URL to `iframe.html#bar`.
Comment 1 Radar WebKit Bug Importer 2021-03-25 05:02:14 PDT
<rdar://problem/75832299>
Comment 2 Ahmad Saleem 2023-12-30 05:21:44 PST
I am unable to reproduce using - https://mysticatea.github.io/webkit-test/index.html

It shoes `index.html#bar` and matches Chrome Canary 122.
Comment 3 Ahmad Saleem 2023-12-30 05:22:01 PST
(In reply to Ahmad Saleem from comment #2)
> I am unable to reproduce using -
> https://mysticatea.github.io/webkit-test/index.html
> 
> It shoes `index.html#bar` and matches Chrome Canary 122.

Using Safari 17.2.1