Different history behavior seen on a Economic Times webpage
Categories
(Core :: DOM: Navigation, defect, P3)
Tracking
()
Webcompat Priority | P3 |
People
(Reporter: neha, Unassigned)
References
(Blocks 1 open bug)
Details
(Keywords: parity-chrome, parity-safari)
Navigating to a Economic Times page from the search results seems to add different history entries on different browsers.
To go back to the search results, it requires:
4 clicks on the latest Firefox Nightly (73.0a1 (2019-12-12) (64-bit))
1 click on Chrome
2 clicks on Safari
Video recording available at https://www.dropbox.com/s/yfkazj491statkr/Screen%20Recording%202019-12-12%20at%205.05.55%20PM.mov?dl=0 showing the different behavior on all 3 browsers.
Reporter | ||
Comment 1•5 years ago
|
||
If it matters, I was running on Mac OS.
Updated•5 years ago
|
Updated•4 years ago
|
Comment 2•2 years ago
|
||
Ksenia, is still still an issue?
Updated•2 years ago
|
Comment 3•2 years ago
|
||
Yeah, this is reproducible by going to https://www.google.com/search?q=Triangular+fight+in+Tripura&source=lnms&tbm=nws&sa=X&ved=2ahUKEwjy3YiUqZj9AhUykokEHbFvBxAQ_AUoA3oECAEQBQ&cshid=1676491534917433&biw=1728&bih=904&dpr=2 and clicking on the article from the Economic Times.
The difference between Firefox and Chrome is that when clicking back button, popstate
event is not fired in Chrome, therefore the redirect inside this handler doesn't happen:
history.pushState(null, null, document.URL);
g.addEventListener('popstate', function (k) {
if (g.location.href.indexOf('#') == - 1) {
g.location.href = '/?back=1'
}
}, false)
If I interact with the page in Chrome (by selecting some text in the article, for example), then the behaviour starts matching Firefox.
Description
•