WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
NEW
233420
Window.location setter not adding new global history entry (session history works as expected)
https://bugs.webkit.org/show_bug.cgi?id=233420
Summary
Window.location setter not adding new global history entry (session history w...
Sam Sneddon [:gsnedders]
Reported
2021-11-22 06:46:13 PST
<div> <button id="mybutton1" type="button"> Change location </button> </div> <script> function MyClick1(event) { location = "
https://underpassapp.com
"; } document.getElementById("mybutton1") .addEventListener("click", MyClick1); </script> In Firefox and Chrome this creates a a new history item, in Safari this doesn't. Perhaps
https://wpt.fyi/results/html/browsers/browsing-the-web/navigating-across-documents/replace-before-load?label=master&label=experimental&product=chrome&product=firefox&product=safari&aligned&q=location-setter
, but likely we have some WPT coverage for this.
Attachments
Add attachment
proposed patch, testcase, etc.
Radar WebKit Bug Importer
Comment 1
2021-11-29 06:47:26 PST
<
rdar://problem/85814717
>
Chris Dumez
Comment 2
2021-11-29 14:21:48 PST
I am unable to reproduce. When I click the button, I see history.length increase by one and there is an option to go back in the Safari UI.
Chris Dumez
Comment 3
2021-11-29 14:24:45 PST
I see this was reported on macOS 10.13 High Sierra which is super old. I am on macOS 12.1 Monterey so this could be why I cannot reproduce.
Sam Sneddon [:gsnedders]
Comment 4
2021-11-30 04:23:14 PST
(In reply to Chris Dumez from
comment #3
)
> I see this was reported on macOS 10.13 High Sierra which is super old. I am > on macOS 12.1 Monterey so this could be why I cannot reproduce.
The post says "This bug appears to be many years old: it occurs in the latest version 15.1, and it occurs in the oldest version that I could test, Safari 11 on macOS 10.13 High Sierra." Certainly I can reproduce it on 12.0.1 (21A559), but I don't have 12.1 immediately to hand.
Chris Dumez
Comment 5
2021-12-01 07:48:40 PST
***
Bug 233685
has been marked as a duplicate of this bug. ***
Brady Eidson
Comment 6
2022-03-22 23:19:35 PDT
Chris I think you were testing the wrong thing. This is about browser global history, not session history.
Brady Eidson
Comment 7
2022-03-22 23:20:22 PDT
This blog post that spawned the radar mentioned that, not sure why that wasn’t included in the report
https://lapcatsoftware.com/articles/history.html
Brady Eidson
Comment 8
2022-03-22 23:22:08 PDT
And on that note, this may be WebKit not sending a sensible history delegate message to Safari, or it might be Safari mishandling it. Investigation will be needed.
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