| Index: chrome/browser/chromeos/login/ui/webui_login_view.cc
|
| diff --git a/chrome/browser/chromeos/login/ui/webui_login_view.cc b/chrome/browser/chromeos/login/ui/webui_login_view.cc
|
| index 65b2c75fcb42aa20f6fed4507b9b4d90cb94da78..34e9f185836634c2106b692caa57f5d9c9c655ea 100644
|
| --- a/chrome/browser/chromeos/login/ui/webui_login_view.cc
|
| +++ b/chrome/browser/chromeos/login/ui/webui_login_view.cc
|
| @@ -348,7 +348,19 @@ void WebUILoginView::SetStatusAreaVisible(bool visible) {
|
|
|
| void WebUILoginView::SetUIEnabled(bool enabled) {
|
| forward_keyboard_event_ = enabled;
|
| - ash::Shell::GetInstance()->GetPrimarySystemTray()->SetEnabled(enabled);
|
| + ash::SystemTray* tray = ash::Shell::GetInstance()->GetPrimarySystemTray();
|
| +
|
| + // We disable the UI to prevent user from interracting with UI elements,
|
| + // particullary with the system tray menu. However, in case if the system tray
|
| + // bubble is opened at this point, it remains opened and interactictive even
|
| + // after SystemTray::SetEnabled(false) call, which can be dangerous
|
| + // (http://crbug.com/497080). Close the menu to fix it. Calling
|
| + // SystemTray::SetEnabled(false) guarantees, that the menu will not be opened
|
| + // until the UI is enabled again.
|
| + if (!enabled && tray->HasSystemBubble())
|
| + tray->CloseSystemBubble();
|
| +
|
| + tray->SetEnabled(enabled);
|
| }
|
|
|
| void WebUILoginView::AddFrameObserver(FrameObserver* frame_observer) {
|
|
|