Commit c842f9ff authored by Stephen Sigwart's avatar Stephen Sigwart Committed by Commit Bot

[omnibox] Fix cursor position on long URLs

Bug: 1143104
Change-Id: I3a01e6a37b62fdf61f4393edbdf4521aec9fa238
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2511709Reviewed-by: default avatarTommy Li <tommycli@chromium.org>
Commit-Queue: Stephen Sigwart <ssigwart@gmail.com>
Cr-Commit-Position: refs/heads/master@{#823276}
parent 0eb4a2ec
...@@ -1567,7 +1567,9 @@ bool OmniboxViewViews::OnMousePressed(const ui::MouseEvent& event) { ...@@ -1567,7 +1567,9 @@ bool OmniboxViewViews::OnMousePressed(const ui::MouseEvent& event) {
offset + GetCursorPosition() - next_double_click_selection_len_; offset + GetCursorPosition() - next_double_click_selection_len_;
} }
// Reset selection // Reset selection
SelectAll(false); // Select all in the reverse direction so as not to scroll the caret
// into view and shift the contents jarringly.
SelectAll(true);
} }
} else if (event.GetClickCount() == 2 && event.IsLeftMouseButton()) { } else if (event.GetClickCount() == 2 && event.IsLeftMouseButton()) {
// If the user double clicked and we unelided between the first and second // If the user double clicked and we unelided between the first and second
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment