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

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

Issue 283363002: Hide context menu on 'touchstart' event. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase. 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 1a23019c05408799c0ccb1bc3f86bf91961f16ff..fd9b183b341a0ce2aaeb15e798a5d0297e597081 100644
--- a/ui/webui/resources/js/cr/ui/context_menu_handler.js
+++ b/ui/webui/resources/js/cr/ui/context_menu_handler.js
@@ -50,6 +50,7 @@ cr.define('cr.ui', function() {
var win = doc.defaultView;
this.showingEvents_.add(doc, 'keydown', this, true);
this.showingEvents_.add(doc, 'mousedown', this, true);
+ this.showingEvents_.add(doc, 'touchstart', this, true);
this.showingEvents_.add(doc, 'focus', this);
this.showingEvents_.add(win, 'popstate', this);
this.showingEvents_.add(win, 'resize', this);
@@ -150,6 +151,7 @@ cr.define('cr.ui', function() {
switch (e.type) {
case 'mousedown':
+ case 'touchstart':
if (!this.menu.contains(e.target))
this.hideMenu();
else
« 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