Open Bug 1603609 Opened 4 years ago Updated 1 year ago

Different history behavior seen on a Economic Times webpage

Categories

(Core :: DOM: Navigation, defect, P3)

defect

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.

If it matters, I was running on Mac OS.

Webcompat Priority: --- → ?
Flags: needinfo?(bugs)
Priority: -- → P3
Webcompat Priority: ? → revisit
Flags: needinfo?(bugs)

Ksenia, is still still an issue?

Webcompat Priority: revisit → P3
Flags: needinfo?(kberezina)
Severity: normal → S3

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.

Flags: needinfo?(kberezina)
You need to log in before you can comment on or make changes to this bug.