Index: ui/views/window/dialog_delegate.cc |
diff --git a/ui/views/window/dialog_delegate.cc b/ui/views/window/dialog_delegate.cc |
index 333adf9da1840b1f7f8f9f87973268d4f6694499..24a0c7cd1efd63fb0cf8c50b3c2970e0bded187e 100644 |
--- a/ui/views/window/dialog_delegate.cc |
+++ b/ui/views/window/dialog_delegate.cc |
@@ -163,8 +163,11 @@ bool DialogDelegate::IsDialogButtonEnabled(ui::DialogButton button) const { |
} |
View* DialogDelegate::GetInitiallyFocusedView() { |
- // Focus the default button if any. |
const DialogClientView* dcv = GetDialogClientView(); |
+ if (!dcv->GetFocusManager()->keyboard_accessible()) |
karandeepb
2016/12/30 21:16:04
null-check the focus manager?
Did you test this
Patti Lor
2017/01/03 03:48:26
Oops, that's a mistake. I originally had the #ifde
karandeepb
2017/01/04 00:12:33
Yeah this seems reasonable to me as well, though o
|
+ return NULL; |
+ |
+ // Focus the default button if any. |
int default_button = GetDefaultDialogButton(); |
if (default_button == ui::DIALOG_BUTTON_NONE) |
return NULL; |