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

Unified Diff: chrome/browser/ui/webui/signin/sync_confirmation_handler.cc

Issue 1949613003: Clear initial focus in Sync Confirmation dialog. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix unit tests Created 4 years, 7 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
Index: chrome/browser/ui/webui/signin/sync_confirmation_handler.cc
diff --git a/chrome/browser/ui/webui/signin/sync_confirmation_handler.cc b/chrome/browser/ui/webui/signin/sync_confirmation_handler.cc
index 9cf12ca051312b3a44083a2ad79c7dc4684868d4..b3356871215acc22eff7145cb8231953339cd09d 100644
--- a/chrome/browser/ui/webui/signin/sync_confirmation_handler.cc
+++ b/chrome/browser/ui/webui/signin/sync_confirmation_handler.cc
@@ -121,4 +121,11 @@ void SyncConfirmationHandler::HandleInitializedWithSize(
browser->signin_view_controller()->delegate()->ResizeNativeView(
static_cast<int>(height));
+
+ // After the dialog is shown, some platforms might have an element focused.
+ // To be consistent, clear the focused element on all platforms.
+ // TODO(anthonyvd): Figure out why this is needed on Mac and not other
+ // platforms and if there's a way to start unfocused while avoiding this
+ // workaround.
+ web_ui()->CallJavascriptFunction("sync.confirmation.clearFocus");
}

Powered by Google App Engine
This is Rietveld 408576698