Merge pull request #329 from picklesrus/doubleclick

Add event preventDefault() calls to the end of zoom button handlers s…
This commit is contained in:
Neil Fraser
2016-04-11 17:47:56 -07:00
2 changed files with 3 additions and 0 deletions

View File

@@ -1100,6 +1100,7 @@ Blockly.WorkspaceSvg.prototype.zoomReset = function(e) {
}
// This event has been handled. Don't start a workspace drag.
e.stopPropagation();
e.preventDefault();
};
/**

View File

@@ -166,10 +166,12 @@ Blockly.ZoomControls.prototype.createDom = function() {
Blockly.bindEvent_(zoominSvg, 'mousedown', null, function(e) {
workspace.zoomCenter(1);
e.stopPropagation(); // Don't start a workspace scroll.
e.preventDefault();
});
Blockly.bindEvent_(zoomoutSvg, 'mousedown', null, function(e) {
workspace.zoomCenter(-1);
e.stopPropagation(); // Don't start a workspace scroll.
e.preventDefault();
});
return this.svgGroup_;