diff options
author | jamiewalch@chromium.org <jamiewalch@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-02-28 04:04:25 +0000 |
---|---|---|
committer | jamiewalch@chromium.org <jamiewalch@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-02-28 04:04:25 +0000 |
commit | 730813d5a470b0913797a06418bd7d23dbd829eb (patch) | |
tree | b4d8788b471338381f2ad7d6f3ae2a51a4b37d3a /remoting/webapp/menu_button.js | |
parent | ced96af37fdfbf2289bed85c690011e684345077 (diff) | |
download | chromium_src-730813d5a470b0913797a06418bd7d23dbd829eb.zip chromium_src-730813d5a470b0913797a06418bd7d23dbd829eb.tar.gz chromium_src-730813d5a470b0913797a06418bd7d23dbd829eb.tar.bz2 |
Attach menu-dismiss handler to <html> instead of <body>.
The <body> node does not cover the browser window outside the plugin, so the
menu can't be dismissed by clicking there without this change.
Note that clicking on the plugin still doesn't dismiss the menu on Linux.
BUG=178522
Review URL: https://chromiumcodereview.appspot.com/12340120
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@185144 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'remoting/webapp/menu_button.js')
-rw-r--r-- | remoting/webapp/menu_button.js | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/remoting/webapp/menu_button.js b/remoting/webapp/menu_button.js index a3da1b5..c429210 100644 --- a/remoting/webapp/menu_button.js +++ b/remoting/webapp/menu_button.js @@ -51,7 +51,11 @@ remoting.MenuButton = function(container, opt_onShow) { that.button_.removeEventListener('click', that.onClick_, false); window.setTimeout( function() { - document.body.addEventListener('click', that.closeHandler_, true); + // Attach the click handler to the <html> node so that it includes + // the document area outside the plugin, which is not covered by + // the <body> node. + var htmlNode = document.body.parentNode; + htmlNode.addEventListener('click', that.closeHandler_, true); }, 100); }; |