Closed Bug 1522278 Opened 5 years ago Closed 5 years ago

When autofilling, try to detect whether the user deleted text instead of checking whether the old search string starts with the new search string

Categories

(Firefox :: Address Bar, enhancement, P3)

enhancement
Points:
2

Tracking

()

RESOLVED FIXED
Firefox 68
Iteration:
68.3 - Apr 15 - 28
Tracking Status
firefox68 --- fixed

People

(Reporter: adw, Assigned: adw)

References

Details

Attachments

(1 file)

When a new search query starts, we disable autofill if the old search string starts with the new search string. That's because when the user deletes text at the end of the input, we don't want to autofill the same value that the user just deleted. Marco suggests we should do better and try to detect when the user has actually deleted text instead of, or instead of only, doing the string comparison.

See https://phabricator.services.mozilla.com/D17040?vs=54236&id=54559&whitespace=ignore-most#inline-93568

I'll mark this as a P3 since it's not required for MVP imo, since the current behavior is what the legacy controller does. Also, I'm not sure it's even possible or a good idea to try and detect all the ways the user can delete text.

See Also: → 1524550
No longer blocks: quantumbar
Points: --- → 2
Assignee: nobody → adw
Iteration: --- → 68.3 - Apr 15 - 28

(In reply to Drew Willcoxon :adw from comment #0)

Also, I'm not sure it's even possible or a good idea to try
and detect all the ways the user can delete text.

I'm having success (so far) using nsIEditActionListener: https://searchfox.org/mozilla-central/rev/6dab6dad9cc852011a14275a8b2c2c03ed7600a7/editor/nsIEditActionListener.idl

A little hacky, see discussion in phabricator.

Pushed by dwillcoxon@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/47050699cd5c
Use nsIEditActionListener to detect when the user deletes autofilled substrings. r=mak
Status: NEW → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 68
Blocks: 1545731
No longer blocks: 1545731
Regressions: 1545731
No longer regressions: 1545731
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: