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

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

Issue 284233007: Do not call event.preventDefault() on touchstart for menu items. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 7 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/context_menu_handler.js
diff --git a/ui/webui/resources/js/cr/ui/context_menu_handler.js b/ui/webui/resources/js/cr/ui/context_menu_handler.js
index fd9b183b341a0ce2aaeb15e798a5d0297e597081..710856b1528f61f617eb31567ca7d98e811cb506 100644
--- a/ui/webui/resources/js/cr/ui/context_menu_handler.js
+++ b/ui/webui/resources/js/cr/ui/context_menu_handler.js
@@ -151,12 +151,17 @@ cr.define('cr.ui', function() {
switch (e.type) {
case 'mousedown':
- case 'touchstart':
if (!this.menu.contains(e.target))
this.hideMenu();
else
e.preventDefault();
break;
+
+ case 'touchstart':
+ if (!this.menu.contains(e.target))
+ this.hideMenu();
+ break;
+
case 'keydown':
// keyIdentifier does not report 'Esc' correctly
if (e.keyCode == 27 /* Esc */) {
« 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