Skip to content

Commit a14e1e9

Browse files
committed
Make sure the editor is re-focused after a no-op drag
Closes #1168
1 parent 8388914 commit a14e1e9

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
@@ -1560,7 +1560,8 @@ window.CodeMirror = (function() {
15601560
// Don't do a replace if the drop happened inside of the selected text.
15611561
if (cm.view.draggingText && !(posLess(pos, cm.view.sel.from) || posLess(cm.view.sel.to, pos))) {
15621562
cm.view.draggingText(e);
1563-
if (ie) setTimeout(bind(focusInput, cm), 50);
1563+
// Ensure the editor is re-focused
1564+
setTimeout(bind(focusInput, cm), 20);
15641565
return;
15651566
}
15661567
try {

0 commit comments

Comments
 (0)