| Index: ash/common/system/tray/system_tray_bubble.cc
|
| diff --git a/ash/common/system/tray/system_tray_bubble.cc b/ash/common/system/tray/system_tray_bubble.cc
|
| index a1eb75b0ad52c225b542b919865a0dde6f43edcb..6cbfb012c79a4c10b59e83b2d3605a1f7c1d7c02 100644
|
| --- a/ash/common/system/tray/system_tray_bubble.cc
|
| +++ b/ash/common/system/tray/system_tray_bubble.cc
|
| @@ -213,8 +213,14 @@ void SystemTrayBubble::FocusDefaultIfNeeded() {
|
|
|
| views::View* view =
|
| manager->GetNextFocusableView(nullptr, nullptr, false, false);
|
| - if (view)
|
| + // TODO(oshima): RequestFocus calls View::OnFocus even if the widget
|
| + // is not active (crbug.com/621791). Remove this check once the bug
|
| + // is fixed.
|
| + if (bubble_view_->GetWidget()->IsActive()) {
|
| view->RequestFocus();
|
| + } else {
|
| + manager->SetStoredFocusView(view);
|
| + }
|
| }
|
|
|
| void SystemTrayBubble::DestroyItemViews() {
|
| @@ -347,8 +353,10 @@ void SystemTrayBubble::CreateItemViews(LoginStatus login_status) {
|
| }
|
| }
|
|
|
| - if (focus_view)
|
| + if (focus_view) {
|
| + tray_->ActivateBubble();
|
| focus_view->RequestFocus();
|
| + }
|
| }
|
|
|
| } // namespace ash
|
|
|