Index: ui/keyboard/keyboard_layout_manager.cc |
diff --git a/ui/keyboard/keyboard_layout_manager.cc b/ui/keyboard/keyboard_layout_manager.cc |
index c54f78ceeefebd14b5c6f780d55b4c1903122bb2..9946060cd9668396af686bca34061953533bc39b 100644 |
--- a/ui/keyboard/keyboard_layout_manager.cc |
+++ b/ui/keyboard/keyboard_layout_manager.cc |
@@ -49,11 +49,11 @@ |
gfx::Rect old_bounds = child->bounds(); |
SetChildBoundsDirect(child, requested_bounds); |
- if (old_bounds.height() == 0 && child->bounds().height() != 0 && |
- controller_->show_on_resize()) { |
- // The window height is set to 0 initially or before switch to an IME in a |
- // different extension. Virtual keyboard window may wait for this bounds |
- // change to correctly animate in. |
+ if (old_bounds.height() == 0 && child->bounds().height() != 0) { |
+ // The window height is set to 0 initially. If the height of |old_bounds| is |
+ // 0 and the new bounds is not 0, it probably means window.resizeTo is |
+ // called to set the window height. We should try to show keyboard again in |
+ // case the show keyboard request is called before the height is set. |
controller_->ShowKeyboard(false); |
} else { |
// We need to send out this notification only if keyboard is visible since |