commit | 82cd7ac56df6fe50cc071dcca0a0b9ee916daf4e | [log] [tgz] |
---|---|---|
author | manuk <manukh@chromium.org> | Mon Mar 04 23:40:34 2019 |
committer | Commit Bot <commit-bot@chromium.org> | Mon Mar 04 23:40:34 2019 |
tree | 2cbd37165338ec081785725637c1e6d1ab14c151 | |
parent | 96bd5c72ae17c2b976e4f7fe52d95f3389e3851e [diff] |
[omnibox]: Restore untrimmed user text when reverting the omnibox. Previously, when reverting the omnibox selection, we restored the inline autocomplete, keyword, and is_keyword_hint from the default match, and we restored the cursor position from computing user_text's length. However, we did not restore user_text itself; this worked most of the time, as user_text would typically be unaffected when scrolling the omnibox selection. When accepting a keyword (either a default match or another lower in the dropdown), the user_text_ is destructively trimmed of its 1st word, the keyword. This resulted in displaying the trimmed user_text after reverting. E.g. 1) Assume typing 'goo' results in 'goo[gle.com]' with a keyword hint. 2) Press <tab> to accept the keyword results in 'Search google | '. 3) Press <tab> to select the 2nd match. 4) Pressing <escape> to revert the omnibox results in 'gle[.com]'. Entering and leaving keyword mode, even if the keyword match was not the default match, but a later match, would result in a similar issue: 1) Assume typing 'goo' results in 'goo[.com]', and the 2nd match is 'google.com' with a keyword hint. 2) Press <tab> thrice to select the 2nd match, enter keyword mode, and leave keyword mode. 3) Pressing <escape> to revert the omnibox results in '.co[m]'. With this CL, we track the untrimmed user_text in order to restore it when the omnibox reverts. This does not resolve the similar issue 702866, which is in regards to forgetting the original URL when entering keyword mode. Bug: 705262, 736931, 924265 Change-Id: I2805ac9ad0f982ca06434919effd038b12dbfeaf Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1500023 Commit-Queue: manuk hovanesian <manukh@chromium.org> Reviewed-by: Tommy Li <tommycli@chromium.org> Cr-Commit-Position: refs/heads/master@{#637479}
Chromium is an open-source browser project that aims to build a safer, faster, and more stable way for all users to experience the web.
The project's web site is https://www.chromium.org.
Documentation in the source is rooted in docs/README.md.
Learn how to Get Around the Chromium Source Code Directory Structure .