www.reddit.com - "Reddit" logo does not refresh the webpage after the 1st attempt
Categories
(Web Compatibility :: Site Reports, defect, P3)
Tracking
(Webcompat Priority:P2, Webcompat Score:6, firefox147 affected)
| Tracking | Status | |
|---|---|---|
| firefox147 | --- | affected |
People
(Reporter: rbucata, Unassigned)
References
()
Details
(Keywords: webcompat:platform-bug, webcompat:site-report, Whiteboard: [webcompat-source:web-bugs][webcompat:sightline][webcompat:japan])
User Story
platform:windows,mac,linux,android impact:feature-broken configuration:general affects:some branch:release diagnosis-team:DOM user-impact-score:270
Environment:
Operating system: Mac OS X 10.15
Firefox version: Firefox 130.0
Steps to reproduce:
- Navigate to: https://www.reddit.com/
- Click on the on the logo situated in the page header
- Click again multiple times and observe
Expected Behavior:
The page refreshes after each click
Actual Behavior:
The page refreshes only after the 1st click
Notes:
- Reproduces regardless of the status of ETP
- Reproduces in Firefox Nightly, and Firefox Release
- Does not reproduce in Chrome
- F5 and browser refresh button works as expected
Created from https://github.com/webcompat/web-bugs/issues/141479
Updated•1 year ago
|
Updated•1 year ago
|
Comment 1•1 year ago
|
||
Profile of loading and clicking reddit logo upper left. It never reloads (different than report). Linux Fedora, local m-c build
Comment 2•1 year ago
|
||
I see OnLocationChange, history operations, etc
I see a UserTiming marker for UserTiming — same-document-navigation:https://www.reddit.com/
My guess is that they're suppressing same-URL navigation on purpose. No idea why it doesn't happen all the time (it does for me), or why it's different on Chrome
Updated•1 year ago
|
Updated•1 year ago
|
Updated•1 year ago
|
Updated•10 months ago
|
Comment 3•10 months ago
|
||
The site uses a polyfill for the Navigation API (see apply-polyfill-1c410a4f.js). The polyfill isn't loaded in Chrome, so that could be the source of the different behaviors between browsers.
However, suppressing same-URL navigation doesn't seem to be the default behavior of that polyfill, so there seems to be a site bug in that code path (if it's intended behavior then I wonder why they didn't also implement it in the code path that Chrome takes).
Comment 4•10 months ago
|
||
If I set a breakpoint in shell-2ee313a7.js at if ('replace' === e.navigationType) I see that e.navigationType is "push" in Firefox but "replace" in Chrome. If I then set e.navigationType to "replace" and resume, the page is reloaded in Firefox as well.
Comment 5•10 months ago
•
|
||
Here's a simple reproduction of that difference for e.navigationType: Go to https://hbenl.github.io/test/navigationtype/ (previously https://navigationtype.glitch.me/), open the web console, enable "Persist logs" and click the link in the page. In Firefox it will log push and in Chrome replace. So the root cause of the different behavior seems to be this polyfill setting a different navigationType than Chrome's native implementation.
Comment 6•10 months ago
|
||
This is the code for https://navigationtype.glitch.me/:
<script>
import("https://cdn.skypack.dev/@virtualstate/navigation/polyfill.js").then(() =>
navigation.addEventListener("navigate", e => console.log(e.navigationType))
)
</script>
<a href=".">Click</a>
Comment 7•10 months ago
|
||
I've opened a GitHub issue for the polyfill: https://github.com/virtualstate/navigation/issues/43
Comment 8•10 months ago
|
||
So this is a combination of a missing feature (the Navigation API) and a bug in the polyfill that the site uses for that feature.
We could also create a sitepatch once there is a fixed version of the polyfill available.
Updated•7 months ago
|
Comment 9•6 months ago
|
||
The polyfill has been fixed, so we could create a sitepatch.
Updated•6 months ago
|
Comment 10•5 months ago
•
|
||
Hi Holger,
I wonder what the next step is here, now that the Navigation API is enabled in Nightly, but I still see loading problems when I click the logo. Nothing happens at all, no matter how many clicks I've done, which is different from the original report but still an issue. Thank you.
Updated•5 months ago
|
Comment 11•5 months ago
|
||
(In reply to Hsin-Yi Tsai (she/her) [:hsinyi] from comment #10)
now that the Navigation API is enabled in Nightly, but I still see loading problems when I click the logo.
Our implementation of the Navigation API has the same issue that the old polyfill has: the navigationType is set to push when it should be replace. I've opened Bug 1998121 for that.
I think we should fix the Navigation API and wait for it to ride the trains instead of creating a sitepatch (which may be hard to do).
Comment 12•5 months ago
|
||
Noting a site patch should not be needed for this, I have recently reached out directly and the site should be updated with the latest polyfill version.
Updated•5 months ago
|
| Reporter | ||
Comment 13•4 months ago
|
||
This is still an issue using the latest Nightly
| Reporter | ||
Updated•4 months ago
|
Comment 14•4 months ago
|
||
I cannot reproduce this on the latest Nightly, however on Release and Beta is still reproducible.
@hbenl Should we keep this open for a possible uplift?
Comment 15•4 months ago
|
||
(In reply to Calin Tanase from comment #14)
I cannot reproduce this on the latest Nightly, however on Release and Beta is still reproducible.
@hbenl Should we keep this open for a possible uplift?
This is only a relatively minor issue (and the Navigation API is currently only enabled in Nightly), so I'll close this.
Description
•