Remove EditableCombobox special handling with show_menu_on_next_focus_.
We would set this variable to false to prevent the menu from coming down if the EditableCombobox gets focus automatically (as soon as the password bubble is shown for example). We now remove it, so focusing on the EditableCombobox always brings down the menu, and instead we make sure that the username EditableCombobox doesn't get focus automatically when the password bubble is shown. When the bubble shows up automatically the new Widget wouldn't get focus anyway so there is no issue there. When the bubble shows up due to the user clicking the key icon in the URL bar, the Widget would become active, and in turn the username EditableCombobox would get focus. This CL changes this behavior: The Widget still becomes active, but the username doesn't get focus. The only scenario in which the username also gets focus is when there are no suggested usernames, so the user can start filling it out right away. This was intended by the current code, but there was a mistake, where it was checking for |model()->pending_password().username_value.empty()| instead of |username_dropdown_->GetText().empty()|. The |username_value| variable could in fact be empty even when the control shows text in cases where there are more than one possible username. Bug: 965426 Change-Id: I5b843670beca6022f819336d9c9611940eb1e05f Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1621395 Commit-Queue: Edin Kadric <edinkadric@google.com> Reviewed-by:Vasilii Sukhanov <vasilii@chromium.org> Reviewed-by:
Michael Wasserman <msw@chromium.org> Cr-Commit-Position: refs/heads/master@{#662789}
Showing
Please register or sign in to comment