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

Unified Diff: chrome/browser/resources/chromeos/login/bubble.js

Issue 10827015: login-webui: Close any bubble when window loses focus. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 5 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/chromeos/login/bubble.js
diff --git a/chrome/browser/resources/chromeos/login/bubble.js b/chrome/browser/resources/chromeos/login/bubble.js
index b7b9e6442525ed68630394d0a016cf0caeedbf95..492686ae907ff856a0c22b4be7f6fe96ff9430e5 100644
--- a/chrome/browser/resources/chromeos/login/bubble.js
+++ b/chrome/browser/resources/chromeos/login/bubble.js
@@ -38,6 +38,7 @@ cr.define('cr.ui', function() {
this.handleDocClick_.bind(this));
this.ownerDocument.addEventListener('keydown',
this.handleDocKeyDown_.bind(this));
+ window.addEventListener('blur', this.handleWindowBlur_.bind(this));
this.addEventListener('webkitTransitionEnd',
this.handleTransitionEnd_.bind(this));
},
@@ -215,6 +216,15 @@ cr.define('cr.ui', function() {
handleDocKeyDown_: function(e) {
if (!this.hidden)
this.hide();
+ },
+
+ /**
+ * Handler of window blur event.
+ * @private
+ */
+ handleWindowBlur_: function(e) {
+ if (!this.hidden)
+ this.hide();
}
};
« 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