Open EditableCombobox menu on mouse release event (and gesture).
This makes it such that when the EditableCombobox is focused but the menu isn't open, a click on the textfield but not the arrow still opens the menu (as would happen with a click on the textfield if the menu weren't focused). We can get in this situation in two ways: 1) After selecting an item or closing the menu with something like Esc, the menu is still in focus. 2) When first opening a View hosting the EditableCombobox, it could have been set not to show the menu on initial focus (as is the case in the password bubble for example). See associated bug for screenshot. We look at mouse release instead of press so that the user can still select the by clicking and dragging the mouse. If we look at mouse press events then the menu will open and the drag will not select text. Note that we added a call to TextfieldController::HandleMouseEvent in Textfield::OnMouseReleased, so we also had to add a check in other users of TextfieldController::HandleMouseEvent. Bug: 960317 Change-Id: Iaba4834be5e0f68ad3191ca572f2ab011825678e Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1608805Reviewed-by:Michael Wasserman <msw@chromium.org> Commit-Queue: Edin Kadric <edinkadric@google.com> Cr-Commit-Position: refs/heads/master@{#661238}
Showing
Please register or sign in to comment