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

Unified Diff: ui/webui/resources/js/cr/ui/menu_button.js

Issue 13699005: Only hide menus when scrolls come from sources other than inside the menu itself. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 7 years, 8 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: ui/webui/resources/js/cr/ui/menu_button.js
diff --git a/ui/webui/resources/js/cr/ui/menu_button.js b/ui/webui/resources/js/cr/ui/menu_button.js
index de8958bb0697daba0bc947b10539b492ec26296c..8a3491992b763ec0bd6809cf57b8c3f699a236c8 100644
--- a/ui/webui/resources/js/cr/ui/menu_button.js
+++ b/ui/webui/resources/js/cr/ui/menu_button.js
@@ -103,7 +103,6 @@ cr.define('cr.ui', function() {
// Hide the focus ring on mouse click.
this.classList.add('using-mouse');
-
break;
case 'keydown':
this.handleKeyDown(e);
@@ -133,6 +132,9 @@ cr.define('cr.ui', function() {
this.hideMenu(hideDelayed ? HideType.DELAYED : HideType.INSTANT);
break;
case 'scroll':
+ if (!(e.target == this.menu || this.menu.contains(e.target)))
+ this.hideMenu();
+ break;
case 'resize':
this.hideMenu();
break;
« 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