diff --git a/doc/manual.html b/doc/manual.html index 2b0afaee3464fb92447176f22e56412b06f96672..a33b77aef4df5189801901ff84145dd75d7ba4bf 100644 --- a/doc/manual.html +++ b/doc/manual.html @@ -654,7 +654,8 @@ <dt id="event_dom"><code><strong>"mousedown"</strong>, <strong>"dblclick"</strong>, <strong>"contextmenu"</strong>, <strong>"keydown"</strong>, <strong>"keypress"</strong>, - <strong>"keyup"</strong>, <strong>"paste"</strong>, <strong>"dragstart"</strong>, <strong>"dragenter"</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> (instance: CodeMirror, event: Event)</code></dt> <dd>Fired when CodeMirror is handling a DOM event of this type. diff --git a/lib/codemirror.js b/lib/codemirror.js index 078ecdb6dbaf1a5adc687556fc89193db5fbb485..c4f5a0008f7d024183af54f7862cbe214910181b 100644 --- a/lib/codemirror.js +++ b/lib/codemirror.js @@ -1258,6 +1258,7 @@ }); function prepareCopyCut(e) { + if (signalDOMEvent(cm, e)) return if (cm.somethingSelected()) { lastCopied = cm.getSelections(); if (input.inaccurateSelection) { @@ -1615,6 +1616,7 @@ }); function onCopyCut(e) { + if (signalDOMEvent(cm, e)) return if (cm.somethingSelected()) { lastCopied = cm.getSelections(); if (e.type == "cut") cm.replaceSelection("", null, "cut");