diff --git a/doc/manual.html b/doc/manual.html index a33b77aef4df5189801901ff84145dd75d7ba4bf..5087df9061cf003b2de02807332a289307001cbf 100644 --- a/doc/manual.html +++ b/doc/manual.html @@ -653,7 +653,8 @@ should <em>not</em> try to change the state of the editor.</dd> <dt id="event_dom"><code><strong>"mousedown"</strong>, - <strong>"dblclick"</strong>, <strong>"contextmenu"</strong>, <strong>"keydown"</strong>, <strong>"keypress"</strong>, + <strong>"dblclick"</strong>, <strong>"touchstart"</strong>, <strong>"contextmenu"</strong>, + <strong>"keydown"</strong>, <strong>"keypress"</strong>, <strong>"keyup"</strong>, <strong>"cut"</strong>, <strong>"copy"</strong>, <strong>"paste"</strong>, <strong>"dragstart"</strong>, <strong>"dragenter"</strong>, <strong>"dragover"</strong>, <strong>"drop"</strong> diff --git a/lib/codemirror.js b/lib/codemirror.js index c4f5a0008f7d024183af54f7862cbe214910181b..55412ae72aa7a7afadc73f5ee05e5318c0fa14b7 100644 --- a/lib/codemirror.js +++ b/lib/codemirror.js @@ -3435,7 +3435,7 @@ return dx * dx + dy * dy > 20 * 20; } on(d.scroller, "touchstart", function(e) { - if (!isMouseLikeTouchEvent(e)) { + if (!signalDOMEvent(cm, e) && !isMouseLikeTouchEvent(e)) { clearTimeout(touchFinished); var now = +new Date; d.activeTouch = {start: now, moved: false, @@ -3564,7 +3564,7 @@ // not interfere with, such as a scrollbar or widget. function onMouseDown(e) { var cm = this, display = cm.display; - if (display.activeTouch && display.input.supportsTouch() || signalDOMEvent(cm, e)) return; + if (signalDOMEvent(cm, e) || display.activeTouch && display.input.supportsTouch()) return; display.shift = e.shiftKey; if (eventInWidget(display, e)) {