diff --git a/editor/public/img/tool-picker.svg b/editor/public/img/tool-picker.svg index af6f2157..8fa36ba0 100755 --- a/editor/public/img/tool-picker.svg +++ b/editor/public/img/tool-picker.svg @@ -385,6 +385,7 @@ } function hit(evt) { + evt.preventDefault(); var target = evt.target; // Some browsers don't support classList in SVG :( // (i.e. it is defined in HTMLElement, not Element) diff --git a/editor/public/js/editor-ui.js.php b/editor/public/js/editor-ui.js.php index f7ddd8a3..1c6c7c64 100755 --- a/editor/public/js/editor-ui.js.php +++ b/editor/public/js/editor-ui.js.php @@ -537,7 +537,7 @@ function() { }, EditorUI.BACKGROUND_SELECT_DELAY_MS); var endEvent = evt.detail.eventType == "touchstart" ? "touchend" : "mouseup"; - evt.explicitOriginalTarget.addEventListener(endEvent, EditorUI.pencilPressListener, false); + evt.target.addEventListener(endEvent, EditorUI.pencilPressListener, false); } EditorUI.finishPencilPress = function(evt, shortPressCallback) { @@ -545,7 +545,7 @@ function() { if (!EditorUI.isLongPress) { shortPressCallback(); } - evt.target.removeEventListener(evt.type, EditorUI.pencilPressListener, false); + evt.target.ownerDocument.removeEventListener(evt.type, EditorUI.pencilPressListener, false); } EditorUI.selectEraser = function() {