Commit ee08d5f9 authored by Yuichiro Hanada's avatar Yuichiro Hanada Committed by Commit Bot

Shouldn't hide VK in RequestHideKeyboard() if VK is locked.

Bug: 841694
Test: Manual testing on device.
Change-Id: Ic9fe8a6dcf6c4063838070fb5cccfadfbf355f55
Reviewed-on: https://chromium-review.googlesource.com/1053622Reviewed-by: default avatarBlake O'Hare <blakeo@chromium.org>
Commit-Queue: Yuichiro Hanada <yhanada@chromium.org>
Cr-Commit-Position: refs/heads/master@{#557786}
parent 48ab5937
......@@ -401,7 +401,7 @@ void KeyboardController::HideKeyboard(HideReason reason) {
}
void KeyboardController::RequestHideKeyboard() {
if (state_ != KeyboardControllerState::SHOWN)
if (state_ != KeyboardControllerState::SHOWN || keyboard_locked())
return;
ChangeState(KeyboardControllerState::WILL_HIDE);
......
......@@ -598,6 +598,11 @@ TEST_F(KeyboardControllerTest, AlwaysVisibleWhenLocked) {
EXPECT_TRUE(keyboard_container->IsVisible());
EXPECT_FALSE(WillHideKeyboard());
// RequestHideKeyboard is no-op when the keyboard is locked.
controller()->RequestHideKeyboard();
EXPECT_TRUE(keyboard_container->IsVisible());
EXPECT_FALSE(WillHideKeyboard());
SetFocus(&input_client_1);
EXPECT_TRUE(keyboard_container->IsVisible());
......
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