Navigation event has wrong navigationType for clicks to the current URL
Categories
(Core :: DOM: Navigation, defect)
Tracking
()
People
(Reporter: hbenl, Assigned: farre)
References
(Blocks 1 open bug)
Details
(Keywords: webcompat:platform-bug)
User Story
user-impact-score:270
Attachments
(2 files)
When clicking on a link that points to the URL of the current page, the navigation event has navigationType set to push even though the click reloads the page replacing the current navigation history entry instead of adding a new one. In Chrome, the navigationType is replace.
STR:
- open https://hbenl.github.io/test/navigationtype/no-polyfill.html in current Nightly
- open the console and enable "Persist Logs"
- click on the link
Expected: the console shows "replace"
Actual: the console shows "push"
Furthermore I've noticed that after clicking the link, navigation.canGoBack is true even if the browser's back button is disabled and the 2 entries in navigation.activation have different keys. In Chrome, navigation.canGoBack is false in this case and the 2 entries in navigation.activation have the same key (see https://developer.mozilla.org/en-US/docs/Web/API/NavigateEvent/navigationType#:~:text=This%20new%20entry%20will%20reuse%20the%20same%20key%2C%20but%20be%20assigned%20a%20different%20id).
| Reporter | ||
Updated•1 month ago
|
| Reporter | ||
Updated•1 month ago
|
Updated•1 month ago
|
| Assignee | ||
Updated•1 month ago
|
Updated•1 month ago
|
| Assignee | ||
Comment 1•1 month ago
|
||
This is again a missing push -> replace conversion, but this time for #following-hyperlinks-2. This is a scary one-liner, so I'm running a fairly big try for this.
| Assignee | ||
Comment 2•1 month ago
|
||
Updated•1 month ago
|
Comment 4•1 month ago
|
||
| bugherder | ||
Updated•29 days ago
|
Updated•29 days ago
|
Updated•28 days ago
|
Comment 5•28 days ago
|
||
I was able to reproduce the issue on Win11x64 using FF build 146.0a1(20251104214230) I see push in the browser console like on description.
Issue also reproduces on beta 146.0b2 and also on 147.0a1.
Andreas, is there something that I am missing?
Updated•25 days ago
|
| Assignee | ||
Comment 6•24 days ago
|
||
Comment 9•23 days ago
|
||
| bugherder | ||
| Assignee | ||
Updated•21 days ago
|
Description
•