Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(395)

Unified Diff: ui/views/widget/widget.cc

Issue 2684403002: Views: Don't advance focus in Widgets when the stored focus view is not null. (Closed)
Patch Set: Created 3 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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();
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698