Chromium Code Reviews| Index: ui/views/widget/widget.cc |
| diff --git a/ui/views/widget/widget.cc b/ui/views/widget/widget.cc |
| index 6063a224684cb38ec980a29621197060167065c1..01106275f9d88464fec1e7b7821c1eb3aaadefd7 100644 |
| --- a/ui/views/widget/widget.cc |
| +++ b/ui/views/widget/widget.cc |
| @@ -1307,8 +1307,10 @@ bool Widget::SetInitialFocus(ui::WindowShowState show_state) { |
| v->RequestFocus(); |
| // If the request for focus was unsuccessful, fall back to using the first |
| // focusable View instead. |
| - if (focus_manager && focus_manager->GetFocusedView() == nullptr) |
| + if (focus_manager && focus_manager->GetFocusedView() == nullptr && |
| + focus_manager->GetStoredFocusView() == nullptr) { |
|
sky
2017/02/10 18:18:18
Can you clarify why we end up here? I'm specifical
Patti Lor
2017/02/15 03:15:21
The RequestFocus() call doesn't really fail, it ju
sky
2017/02/15 16:28:28
In that case can you check the active status rathe
Patti Lor
2017/02/16 22:58:49
Done.
|
| focus_manager->AdvanceFocus(false); |
| + } |
| } |
| return !!focus_manager->GetFocusedView(); |
| } |