• Darren Shen's avatar
    [VK] Prevent floating keyboard from moving the focused window. · 8bc2d0a3
    Darren Shen authored
    Currently, when the keyboard is shown, we check if it obscures the
    focused window. If it does, we move the focused window upwards so that
    it's no longer obscured by the text field.
    
    While this works well for the docked keyboard, it doesn't make much
    sense for the floating keyboard. Thus, we change the logic to use
    the occluded bounds of the keyboard to check whether it obscures the
    focused window. The occluded bounds is the same as the actual bounds
    for the docked keyboard, but is empty for the floating keyboard. This
    means that the floating keyboard will no longer cause the focused
    window to move upwards.
    
    Bug: 838731
    Change-Id: Id5de5c35980c69443be114631840bdfb64f26b3e
    Reviewed-on: https://chromium-review.googlesource.com/1059976Reviewed-by: default avatarJames Cook <jamescook@chromium.org>
    Reviewed-by: default avatarYuichiro Hanada <yhanada@chromium.org>
    Commit-Queue: Darren Shen <shend@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#559336}
    8bc2d0a3
keyboard_controller_unittest.cc 32.9 KB