Suppress autocomplete when user already typed suggestion |
||
Issue descriptionChrome Version: M71+ OS: all What steps will reproduce the problem? (1) Navigate to https://www.w3schools.com/tags/tryit.asp?filename=tryhtml5_form_autocomplete (2) Type "abc" on the input field labeled "First name" and press "Submit" (3) Reload the page, click on the input field, and click on the autocomplete suggestion. (4) Click somewhere else in the page, and then on the input field again. There is no much value in showing the autocomplete dropdown here. We should suppress it if we are only showing a single suggestion and that's exactly what is being shown on the input field.
,
Dec 18
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/850260abb34a6f53f3ca23a8e0f460249b9c80d6 commit 850260abb34a6f53f3ca23a8e0f460249b9c80d6 Author: Sebastien Lalancette <seblalancette@chromium.org> Date: Tue Dec 18 17:22:47 2018 Suppress Autocomplete when user already typed unique suggestion. E.g. user has suggestion "Bobby", and user types "Bobby", then we shouldn't show the unique and equal (case-sensitive) suggestion. Keep the prefix used to get suggestions in the new QueryHandler data structure. That way, we can associate returned values with the request's context, and filter accordingly. Added unit tests and tested manually in Chromium desktop. Bug: 911146 Change-Id: I1c2c69faee7051944348216fe6a3d0405d1ce357 Reviewed-on: https://chromium-review.googlesource.com/c/1377388 Commit-Queue: Sebastien Lalancette <seblalancette@chromium.org> Reviewed-by: Sebastien Seguin-Gagnon <sebsg@chromium.org> Cr-Commit-Position: refs/heads/master@{#617543} [modify] https://crrev.com/850260abb34a6f53f3ca23a8e0f460249b9c80d6/components/autofill/core/browser/autocomplete_history_manager.cc [modify] https://crrev.com/850260abb34a6f53f3ca23a8e0f460249b9c80d6/components/autofill/core/browser/autocomplete_history_manager.h [modify] https://crrev.com/850260abb34a6f53f3ca23a8e0f460249b9c80d6/components/autofill/core/browser/autocomplete_history_manager_unittest.cc
,
Dec 18
How to test: - Go to: https://rsolomakhin.github.io/autofill/ - Submit some unique input in "Basic form key/value Autocomplete (unstructured data)" (e.g. qwerty1) - Go back to the same input box. - Type in the same input (e.g. qwerty1) Expected result: You should see "qwerty1" as an autocomplete suggestion as you type, but when you're done typing it, the pop-up should be hidden. |
||
►
Sign in to add a comment |
||
Comment 1 by seblalancette@chromium.org
, Dec 3