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

Unified Diff: remoting/webapp/menu_button.js

Issue 12208141: Attach menu dismiss handler to <body>, not <html>. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 10 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: remoting/webapp/menu_button.js
diff --git a/remoting/webapp/menu_button.js b/remoting/webapp/menu_button.js
index ce0a2ed0e6d8fe64358db5155fb3a3eecfac3c21..a3da1b52d5df813adf839005ae8c1df9ec05323b 100644
--- a/remoting/webapp/menu_button.js
+++ b/remoting/webapp/menu_button.js
@@ -51,7 +51,7 @@ remoting.MenuButton = function(container, opt_onShow) {
that.button_.removeEventListener('click', that.onClick_, false);
window.setTimeout(
function() {
- document.all[0].addEventListener('click', that.closeHandler_, true);
+ document.body.addEventListener('click', that.closeHandler_, true);
},
100);
};
@@ -62,7 +62,7 @@ remoting.MenuButton = function(container, opt_onShow) {
*/
this.closeHandler_ = function(event) {
that.button_.classList.remove(remoting.MenuButton.BUTTON_ACTIVE_CLASS_);
- document.all[0].removeEventListener('click', that.closeHandler_, true);
+ document.body.removeEventListener('click', that.closeHandler_, true);
window.setTimeout(
function() {
that.button_.addEventListener('click', that.onClick_, false);
« 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