Closed Bug 2073556 Opened 2 months ago Closed 2 months ago

[HNT] Paste & go on homepage opens a new tab

Categories

(Firefox for Android :: Homepage, defect)

All
Android
defect

Tracking

()

VERIFIED FIXED
158 Branch
Tracking Status
firefox158 --- 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. Copy a link to your clipboard
  2. Open a new homepage tab
  3. Long press the search bar
  4. Press paste & go

Expected behavior

The clipboard link opens in the current homepage tab

Actual behavior

The clipboard link opens in a new tab

Assignee: nobody → npoon
Status: NEW → ASSIGNED

The homepage toolbar's Paste & Go handler in BrowserToolbarMiddleware.kt hard-codes newTab = true, so FenixBrowserUseCases.loadUrlOrSearch takes the tabsUseCases.addTab branch in FenixBrowserUseCases.kt and the existing about:home tab is left behind. The equivalent search path gates that value on settings.enableHomepageAsNewTab in BrowserToolbarSearchMiddleware.kt, which is why Paste followed by Enter reuses the home tab but Paste & Go does not.

Fix: In the LoadFromClipboardClicked branch pass newTab = !settings.enableHomepageAsNewTab (settings is already injected and used for this purpose at #313), and split the test at BrowserToolbarMiddlewareTest.kt, which currently asserts newTab = true, into HNT-on and HNT-off cases.

Suggested severity: S3. An extra tab accumulates on a mainline homepage action with HNT enabled, but nothing is lost and the user can close the leftover tab or use Paste plus Enter instead.


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, ai-triage-wrong-cause, ai-triage-hallucination, ai-triage-out-of-scope, ai-triage-wrong-fix, ai-triage-shallow-fix.

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

Pushed by npoon@mozilla.com: https://github.com/mozilla-firefox/firefox/commit/51d0ee78b428 https://hg.mozilla.org/integration/autoland/rev/c4149cf99ef3 [HNT] Use the current homepage tab for paste and go context menu option r=android-reviewers,gl
Status: ASSIGNED → RESOLVED
Closed: 2 months ago
Resolution: --- → FIXED
Target Milestone: --- → 158 Branch
Flags: qe-verify+

Verified as fixed on the latest Nightly build (158.0a1 from 2026-09-23T21:39:29).

When tapping on +, a tab is added in the tab counter and when a copied link is pasted in the search field, the link then opens in the same tab.

Tested devices:

  • Samsung Galaxy S25 Ultra (Android 16);
  • OnePlus Pad 3 (Android 15);
  • Vivo X80 Lite G5 (Android 13);
  • Xiaomi Mi11 Lite (Android 11);
  • Motorola Nexus 6 (Android 8).

Marking the ticket as verified.

Status: RESOLVED → VERIFIED
Flags: qe-verify+

Hey Lorand,
Can we also confirm that the behaviour for homepage as new tab off hasn't changed? Thanks

Flags: needinfo?(ljanos)

Hey Nick,
Yes, I've looked into the behavior with homepage as new tab off, and it's the same as before, so the pasted link opens in a new tab.

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

Attachment

General

Created:
Updated:
Size: