Closed Bug 1643554 Opened 5 years ago Closed 8 months ago

Need to press back many times on indiatoday.in to go back in history

Categories

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

78 Branch
Unspecified
All
defect

Tracking

()

VERIFIED FIXED
Webcompat Priority P3

People

(Reporter: ekager, Unassigned)

References

(Blocks 2 open bugs)

Details

I can reproduce on Fenix Beta, Nightly, and Fennec so it definitely belongs in another component, but I'm not sure where to put it.

Originally reported: https://github.com/mozilla-mobile/fenix/issues/8180#issuecomment-635058925

STR:

  1. Go to: https://www.indiatoday.in/india/story/air-india-passenger-tests-coronavirus-positive-1682333-2020-05-27

  2. Scroll to the bottom of the page, and to the top again. And stay there for a few seconds (3 to 4 seconds would be enough)

  3. Press the back button, observe that it take more than a single press to go back and sometimes it just refuses to go back and sometimes it takes several clicks before it works.

I think this is related to abuse (or at least misuse) of the History API. There are 5 entries in window.history after doing the STR above.

Hsin-Yi, do you know if there is any effort underway to prevent this type of thing? I'll keep this bug for mitigating these types of things and post a workaround on the Fenix bug.

Flags: needinfo?(htsai)

Peter, can you help shed some light? Thank you.

Flags: needinfo?(htsai) → needinfo?(peterv)

This is being worked on in Bug 1644595.

Status: NEW → RESOLVED
Closed: 5 years ago
Resolution: --- → DUPLICATE

Hmm, this is improved upon by bug 1515073, but it doesn't feel fixed as in the page will very aggressively add history entries while you interact with it, breaking our heuristic. Chrome seems unaffected, so it's probably worth checking what they do differently there.

Flags: needinfo?(peterv) → needinfo?(jhofmann)

I suspect that this is because unlike Chrome we're marking SH entries from cross-origin iframe navigations even if only the parent document received user interaction. We need to ensure that when we get user interaction we only mark it if the document that received the interaction is same-origin with that SH entry.

Or something like that.

Assignee: nobody → jhofmann
Blocks: 1645211
Severity: -- → S3
Status: RESOLVED → REOPENED
Component: General → DOM: Navigation
Flags: needinfo?(jhofmann)
Priority: -- → P3
Product: GeckoView → Core
Resolution: DUPLICATE → ---
Status: REOPENED → ASSIGNED
Priority: P3 → P2

This is still an issue. It was reported on Firefox for Android even for popular sites like bing: https://github.com/mozilla-mobile/fenix/issues/17987#issuecomment-814853381.

Webcompat Priority: --- → ?
Blocks: backtraps
Webcompat Priority: ? → P3

The bug assignee is inactive on Bugzilla, so the assignee is being reset.

Assignee: mail → nobody
Status: ASSIGNED → NEW

(In reply to Emily Kager [:ekager] from comment #0)

I can reproduce on Fenix Beta, Nightly, and Fennec so it definitely belongs in another component, but I'm not sure where to put it.

Originally reported: https://github.com/mozilla-mobile/fenix/issues/8180#issuecomment-635058925

STR:

  1. Go to: https://www.indiatoday.in/india/story/air-india-passenger-tests-coronavirus-positive-1682333-2020-05-27

  2. Scroll to the bottom of the page, and to the top again. And stay there for a few seconds (3 to 4 seconds would be enough)

  3. Press the back button, observe that it take more than a single press to go back and sometimes it just refuses to go back and sometimes it takes several clicks before it works.

I confirmed that I cannot reproduce the issue on indiatoday.in with Nightly Fx 132, while I can still reproduce the problem with older versions, Fx 94 and Fx 102.

(In reply to Thomas Wisniewski [:twisniewski] from comment #9)

Also https://www.aajtak.in/entertainment/television/photo/krushna-abhishek-birthday-love-story-with-kashmira-shah-affair-govinda-tmov-1263266-2021-05-30-3

I still see the issues with this site. I also see the same issues on Chrome.
Adam, is this another symptom of the "redirect" case?

Flags: needinfo?(avandolder)
QA Contact: bmaris

(In reply to Hsin-Yi Tsai (she/her) [:hsinyi] from comment #14)

(In reply to Emily Kager [:ekager] from comment #0)

I can reproduce on Fenix Beta, Nightly, and Fennec so it definitely belongs in another component, but I'm not sure where to put it.

Originally reported: https://github.com/mozilla-mobile/fenix/issues/8180#issuecomment-635058925

STR:

  1. Go to: https://www.indiatoday.in/india/story/air-india-passenger-tests-coronavirus-positive-1682333-2020-05-27

  2. Scroll to the bottom of the page, and to the top again. And stay there for a few seconds (3 to 4 seconds would be enough)

  3. Press the back button, observe that it take more than a single press to go back and sometimes it just refuses to go back and sometimes it takes several clicks before it works.

I confirmed that I cannot reproduce the issue on indiatoday.in with Nightly Fx 132, while I can still reproduce the problem with older versions, Fx 94 and Fx 102.

(In reply to Thomas Wisniewski [:twisniewski] from comment #9)

Also https://www.aajtak.in/entertainment/television/photo/krushna-abhishek-birthday-love-story-with-kashmira-shah-affair-govinda-tmov-1263266-2021-05-30-3

I still see the issues with this site. I also see the same issues on Chrome.
Adam, is this another symptom of the "redirect" case?

Yeah, the page seems to be triggering pushState whenever a scroll occurs - which seems to happen every time it loads a photo, generating a ton of history entries whenever you navigate to the page. Blink and Webkit both behave the same way we do here.

Flags: needinfo?(avandolder)
Status: NEW → RESOLVED
Closed: 5 years ago8 months ago
Resolution: --- → FIXED

Verified using latest Nightly Firefox 135.0a1 on Windows 10, macOS 12 and Ubuntu 22, works as expected if not using affected websites like aajtak.in, sammobile.com.

Verified as fixed also on Android on the latest Nightly Firefox 135.0a1 with Samsung Galaxy S23 Ultra (Android 14).

Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.