[omnibox] For about:blank homepage, select-all the initial focus
Currently, when the user has chosen about:blank as their homepage, and Chromium starts up, the location bar is focused, but the URL "about:blank" is NOT selected. This leads to the cursor being at index 0, and the user starts typing BEFORE the existing "about:blank" URL, so typing "foo" leads to: "fooabout:blank". This is surprising behavior, and this CL fixes that, as well as adds a test. We originally tried to fix this in 2019, but this effort had to be reverted because we caused a bug on the NTP: https://chromium-review.googlesource.com/c/chromium/src/+/1559115 This CL preserves the fixed NTP behavior (validated by a test), and also fixes the about:blank behavior, also validated by a new test. Bug: 45260 Change-Id: I8ca57ea10215c297aabc22e51138af7ea21ef677 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2464202Reviewed-by:Peter Kasting <pkasting@chromium.org> Commit-Queue: Peter Kasting <pkasting@chromium.org> Cr-Commit-Position: refs/heads/master@{#816272}
Showing
Please register or sign in to comment