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

Unified Diff: chrome/browser/resources/gaia_auth_host/authenticator.js

Issue 862543002: Focus <webview> when Signin focused (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixed focus when tabbing then tabbing back Created 5 years, 11 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: chrome/browser/resources/gaia_auth_host/authenticator.js
diff --git a/chrome/browser/resources/gaia_auth_host/authenticator.js b/chrome/browser/resources/gaia_auth_host/authenticator.js
index 3f082da765cabb043dff48d56766e0e7795b47e2..6492781c36c103aac1675b5e131f054451d7a216 100644
--- a/chrome/browser/resources/gaia_auth_host/authenticator.js
+++ b/chrome/browser/resources/gaia_auth_host/authenticator.js
@@ -129,6 +129,8 @@ cr.define('cr.login', function() {
window.addEventListener(
'message', this.onMessageFromWebview_.bind(this), false);
window.addEventListener(
+ 'focus', this.onFocus_.bind(this), false);
+ window.addEventListener(
'popstate', this.onPopState_.bind(this), false);
this.loaded_ = false;
@@ -213,6 +215,15 @@ cr.define('cr.login', function() {
};
/**
+ * Invoked when the sign-in page takes focus.
+ * @param {object} e The focus event being triggered.
+ * @private
+ */
+ Authenticator.prototype.onFocus_ = function(e) {
+ this.webview_.focus();
+ };
+
+ /**
* Invoked when the history state is changed.
* @param {object} e The popstate event being triggered.
* @private
« 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