Closed Bug 1901061 Opened 1 year ago Closed 1 year ago

Autofill sometimes is activated when focusing the urlbar with persisted search terms

Categories

(Firefox :: Address Bar, defect, P2)

defect

Tracking

()

VERIFIED FIXED
136 Branch
Tracking Status
firefox-esr115 --- disabled
firefox-esr128 --- disabled
firefox126 --- disabled
firefox127 --- disabled
firefox128 --- disabled
firefox129 --- disabled
firefox134 --- disabled
firefox135 --- disabled
firefox136 --- verified

People

(Reporter: mak, Assigned: jteow)

References

(Blocks 2 open bugs, Regression)

Details

(Keywords: regression, Whiteboard: [sng][scotchbonnet-followon][scotchbonnet-persistsearchterms])

Attachments

(1 file)

When there's persisted search terms that are also a matchign string for autofill, focusing the urlbar sometimes activates autofill.

Steps to reproduce:

  1. type "moz", it will autofill to moz[illa.org]
  2. backspace the autofilled part, and confirm to load Google search for "moz"
  3. ensure the urlbar is not focused
  4. either left or right click on the urlbar to focus it

ER:
"moz" should be selected
AR:
"moz[illa.org]" is autofilled

This doesn't happen every time, but blurring and focusing again, or reloading the page, blurring and focusing again, makes it happen after less then 10 tries.

I got this regression range after a few tries, due to the intermittent nature of the issue:
https://hg.mozilla.org/mozilla-central/pushloghtml?fromchange=702d4a62e5d03a2b36b3a17645718208a30ddb08&tochange=45fc9bb4de9c9d7d5b9933977891a99d10e47d6e
Out of that, I think the most likely bug is https://bugzilla.mozilla.org/show_bug.cgi?id=1815686 as it is modifying some condition around allowAutofill... Though it's also possible that was wallpapering lack of allowAutofill management in the persisted search terms case (should always be false if there's persisted search terms)

Set release status flags based on info from the regressing bug 1815686

:adw, since you are the author of the regressor, bug 1815686, could you take a look? Also, could you set the severity field?

For more information, please visit BugBot documentation.

Upon reflection, I think this was probably always the case. When working on the feature, I didn't consider the situation where autofill could be triggered.

I don't think the original bug has effectively caused the regression indeed, so the needinfo doesn't make much sense. This should be fixed as part of the persisted terms effort, likely by setting allowAutofill to false explicitly there.

Flags: needinfo?(adw)
Whiteboard: [sng] → [sng-scotchbonnet-followon][scotchbonnet-persistsearchterms]

If the user is modifying their search term, we suspect they don't immediately
want an autofilled url. makeQueryContext always enables autofill if
the allowAutofill is undefined.

Assignee: nobody → jteow
Status: NEW → ASSIGNED
Pushed by jteow@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/f2f4026585e2 Prevent autofill from immediately triggering on persisted search terms - r=adw,urlbar-reviewers
Status: ASSIGNED → RESOLVED
Closed: 1 year ago
Resolution: --- → FIXED
Target Milestone: --- → 136 Branch

Reproducible on a 2025-01-06 Nightly build on Windows 10.
Verified as fixed on Firefox Nightly 136.0a1 on Windows 10, Ubuntu 22, macOS 14.

Status: RESOLVED → VERIFIED
Whiteboard: [sng-scotchbonnet-followon][scotchbonnet-persistsearchterms] → [sng][scotchbonnet-followon][scotchbonnet-persistsearchterms]
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: