From 9c4b83f7745c979c657e528acfc0192071f3261a Mon Sep 17 00:00:00 2001 From: Carlos Galarza Date: Wed, 6 May 2015 17:34:58 -0500 Subject: [PATCH] Enable long-press context menu for Workspaces. --- core/workspace_svg.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/core/workspace_svg.js b/core/workspace_svg.js index 3c4a31550..6018e6529 100644 --- a/core/workspace_svg.js +++ b/core/workspace_svg.js @@ -135,6 +135,9 @@ Blockly.WorkspaceSvg.prototype.createDom = function(opt_backgroundClass) { } Blockly.bindEvent_(this.svgGroup_, 'mousedown', this, this.onMouseDown_); + var thisWorkspace = this; + Blockly.bindEvent_(this.svgGroup_, 'touchstart', null, + function(e) {Blockly.longStart_(e, thisWorkspace);}); // Determine if there needs to be a category tree, or a simple list of // blocks. This cannot be changed later, since the UI is very different.