Closed Bug 2078808 Opened 1 month ago Closed 1 month ago

Using back after delete browsing data does not navigate user to homepage

Categories

(Firefox for Android :: Homepage, defect)

All
Android
defect

Tracking

()

RESOLVED FIXED
161 Branch
Tracking Status
firefox161 --- verified

People

(Reporter: npoon, Assigned: npoon)

References

(Blocks 1 open bug)

Details

(Whiteboard: [fxdroid] [group5])

Attachments

(1 file, 1 external file)

Steps to reproduce

  1. Go to any website. Use google.com as an example.
  2. Go to settings > Delete browsing data
  3. Click delete browsing data
  4. Navigate back until you reach the browser

Expected behavior

Deleting browsing data includes the user's open tabs so the user should land on the homepage

Actual behavior

The user is left in some intermediate state that is a tab but not the homepage

Any additional information?

This is related to homepage as new tab and the AboutHomeBinding.

Bug 2078123 made it so that we no longer incorrectly navigate to the homepage after deleting browsing data but a side effect is that the binding doesn't catch the navigation from about:home to the homepage in this case

When Delete browsing data removes the open tabs, HomepageTabBinding.kt adds and selects a new about:home tab while Settings is still on screen. AboutHomeBinding.kt ignores that URL change because the current destination is not in the browser/menu allowlist added by bug 2078123, and distinctUntilChanged() means nothing fires again when back pops to browserFragment.

Fix: In AboutHomeBinding, remember an about:home change that was skipped because the user was on some other screen, and clear it when the selected tab's URL changes again. Then register an OnDestinationChangedListener that navigates with actionGlobalHome() when the user lands on an allowlisted destination with the flag still set. Re-checking on every destination change is not enough on its own: HomepageNavigation.kt and the toolbar search path move to browserFragment before the tab's URL leaves about:home, so they would bounce straight back to the homepage. Add a "settings, then back to browser" case next to the existing settings test in AboutHomeBindingTest.kt.

Suggested severity: S3. With Homepage as a New Tab enabled, users who delete their tabs land on a blank tab view instead of the homepage, and opening the homepage or a new tab gets them out of it.


If you'd like to provide feedback on this comment, please use the 👍 or 👎 reaction.
If you want to categorize your feedback you can add one of the following tags: ai-triage-{wrong-file, wrong-cause, hallucination, out-of-scope, not-a-bug, wrong-fix, shallow-fix, wrong-severity}.

Needinfo hackbot@mozilla.tld to have a patch generated for this bug, include any questions or directions as needed in your comment.

Assignee: nobody → npoon
Status: NEW → ASSIGNED
Flags: qe-verify+
Pushed by npoon@mozilla.com: https://github.com/mozilla-firefox/firefox/commit/cc1cc02d8ac5 https://hg.mozilla.org/integration/autoland/rev/fc422837027b Make AboutHomeBinding take selected tab url and destination fragment id into account r=android-reviewers,gl
Status: ASSIGNED → RESOLVED
Closed: 1 month ago
Resolution: --- → FIXED
Target Milestone: --- → 161 Branch

Verified as fixed on the latest Nightly 162.0a1 with Pixel 10 (Android 16) and Motorola Moto G72 (Android 13).

You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: