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 |