Skip to content

Commit b17f471

Browse files
committed
Don't try to drag an empty selection
1 parent 0bd1fc6 commit b17f471

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

lib/codemirror.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -275,7 +275,8 @@ var CodeMirror = (function() {
275275
} else { lastClick = now; }
276276

277277
var last = start, going;
278-
if (dragAndDrop && !posLess(start, sel.from) && !posLess(sel.to, start)) {
278+
if (dragAndDrop && !posEq(sel.from, sel.to) &&
279+
!posLess(start, sel.from) && !posLess(sel.to, start)) {
279280
// Let the drag handler handle this.
280281
return;
281282
}

0 commit comments

Comments
 (0)