Skip to content

Commit feed440

Browse files
julienrmarijnh
authored andcommitted
Allow applications to listen for the dragleave event.
1 parent 66b0b4d commit feed440

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

doc/manual.html

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -657,7 +657,8 @@ <h2>Events</h2>
657657
<strong>"keydown"</strong>, <strong>"keypress"</strong>,
658658
<strong>"keyup"</strong>, <strong>"cut"</strong>, <strong>"copy"</strong>, <strong>"paste"</strong>,
659659
<strong>"dragstart"</strong>, <strong>"dragenter"</strong>,
660-
<strong>"dragover"</strong>, <strong>"drop"</strong>
660+
<strong>"dragover"</strong>, <strong>"dragleave"</strong>,
661+
<strong>"drop"</strong>
661662
(instance: CodeMirror, event: Event)</code></dt>
662663
<dd>Fired when CodeMirror is handling a DOM event of this type.
663664
You can <code>preventDefault</code> the event, or give it a

lib/codemirror.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3495,7 +3495,7 @@
34953495
over: function(e) {if (!signalDOMEvent(cm, e)) { onDragOver(cm, e); e_stop(e); }},
34963496
start: function(e){onDragStart(cm, e);},
34973497
drop: operation(cm, onDrop),
3498-
leave: function() {clearDragCursor(cm);}
3498+
leave: function(e) {if (!signalDOMEvent(cm, e)) { clearDragCursor(cm); }}
34993499
};
35003500

35013501
var inp = d.input.getField();

0 commit comments

Comments
 (0)