Index: ash/root_window_controller.cc |
diff --git a/ash/root_window_controller.cc b/ash/root_window_controller.cc |
index 3b36a710965dc96bd43d78c610f0cb55e440cc7e..9327cbd077a5b7b0aa8063d75099723fbf1ad7b9 100644 |
--- a/ash/root_window_controller.cc |
+++ b/ash/root_window_controller.cc |
@@ -531,6 +531,10 @@ void RootWindowController::InitKeyboard() { |
keyboard_controller_->AddObserver(shelf()->shelf_layout_manager()); |
keyboard_controller_->AddObserver(panel_layout_manager_); |
+ // Deletes the old container since |keyboard_controller_| creates a |
+ // new container window in GetContainerWindow(). |
+ delete GetContainer(kShellWindowId_VirtualKeyboardContainer); |
+ |
aura::Window* keyboard_container = |
keyboard_controller_->GetContainerWindow(); |
keyboard_container->set_id(kShellWindowId_VirtualKeyboardContainer); |