[HNT] QR code search on homepage opens in a new tab
Categories
(Firefox for Android :: Homepage, defect)
Tracking
()
| Tracking | Status | |
|---|---|---|
| firefox158 | --- | verified |
People
(Reporter: npoon, Assigned: npoon)
References
(Blocks 1 open bug)
Details
(Whiteboard: [fxdroid] [group5])
Attachments
(1 file, 1 external file, 1 obsolete file)
|
7.71 MB,
video/mp4
|
Details |
Steps to reproduce
- Open a homepage tab
- Scan a QR code
Expected behavior
Scanned link is opened in the homepage tab
Actual behavior
A new tab is opened to open the scanned link
Updated•2 months ago
|
Comment 1•2 months ago
|
||
| frontend-triage | ||
observeQrScannerInput in BrowserToolbarSearchMiddleware.kt is the one loadUrlOrSearch call site in that file that computes newTab without the homepage-as-new-tab short-circuit, passing newTab = appStore.state.searchState.sourceTabId == null at #604. A search started from the homepage toolbar dispatches SearchStarted() with a null tab id (BrowserToolbarMiddleware.kt), so the scan result reaches tabsUseCases.addTab in FenixBrowserUseCases.kt instead of loading into the current tab.
Fix: Use the same expression openSearchOrUrl already uses at #341-349, if (settings.enableHomepageAsNewTab) false else appStore.state.searchState.sourceTabId == null, since settings is already a constructor field of the middleware. Add an HNT-enabled QR case to BrowserToolbarSearchMiddlewareTest.kt next to the existing enableHomepageAsNewTab commit tests.
Suggested severity: S3. The scanned link does load correctly and the only cost is a stray extra tab the user can close, and the affected flag is currently on for nightly and developer builds only.
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.
| Assignee | ||
Updated•2 months ago
|
| Assignee | ||
Comment 2•2 months ago
|
||
| Assignee | ||
Updated•2 months ago
|
| Assignee | ||
Comment 5•2 months ago
|
||
Hey QA,
Can we also confirm that the behaviour for homepage as new tab off hasn't changed? Thanks
Comment 6•2 months ago
•
|
||
Verified as fixed on Nightly 159.0a1 with Samsung S23 Ultra(Android 14) and Pixel 3 XL (Android 9). Also the behaviour of HNT off is not changed.
Updated•2 months ago
|
Updated•2 months ago
|
Comment 7•2 months ago
|
||
Description
•