• Tommy Li's avatar
    [omnibox] Show ZeroSuggest on-click when omnibox already focused on NTP · d14478bd
    Tommy Li authored
    Currently, we trigger on-focus suggestions (ZeroSuggest) when the
    omnibox receives focus.
    
    But what about the case where the omnibox starts with focus, like the
    NTP? In the status quo, the user would have to blur and then re-focus
    the omnibox.
    
    This CL allows users to get on-focus suggestions by clicking or tapping
    the omnibox while already focused, assuming the textfield is empty.
    We restrict it to empty textfield because:
    
     1) The only known use-case is the NTP so far.
    
     2) We want to be conservative and not disrupt any user text selection
        or editing.
    
    Bug: 1010368, 996516
    Change-Id: I2681c297c1372a5421f742bd0f18657f3c8603ca
    Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1863589
    Commit-Queue: Tommy Li <tommycli@chromium.org>
    Reviewed-by: default avatarmanuk hovanesian <manukh@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#706185}
    d14478bd
omnibox_edit_model.h 28.6 KB