code: function leftButtonStartDrag(cm,event,pos,behavior){var display=cm.display,moved=false;var dragEnd=operation(cm,function(e){if(webkit){display.scroller.draggable=false;}cm.state.draggingText=false;off(document,"mouseup",dragEnd);off(document,"mousemove",mouseMove);off(display.scroller,"dragstart",dragStart);off(display.scroller,"drop",dragEnd);if(!moved){e_preventDefault(e);if(!behavior.addNew){extendSelection(cm.doc,pos,null,null,behavior.extend);}// Work around unexplainable focus problem in IE9 (#2127) and Chrome (#3081)
  if(webkit||ie&&ie_version==9){setTimeout(function(){document.body.focus();display.input.focus();},20);}else{display.input.focus();}}});var mouseMove=function mouseMove(e2){moved=moved||Math.abs(event.clientX-e2.clientX)+Math.abs(event.clientY-e2.clientY)>=10;};var dragStart=function dragStart(){return moved=true;};// Let the drag handler handle this.
  if(webkit){display.scroller.draggable=true;}cm.state.draggingText=dragEnd;dragEnd.copy=!behavior.moveOnDrag;// IE's approach to draggable
  if(display.scroller.dragDrop){display.scroller.dragDrop();}on(document,"mouseup",dragEnd);on(document,"mousemove",mouseMove);on(display.scroller,"dragstart",dragStart);on(display.scroller,"drop",dragEnd);delayBlurEvent(cm);setTimeout(function(){return display.input.focus();},20);}
docs: Start a text drag. When it ends, see if any dragging actually happen, and treat as a click if it didn't.