 
     @dragCover.style.display = 'none'
 
+  # FAILSAFE END DRAG HACK
+  # ================================
+
+  hook 'mousedown', 10, ->
+    if @draggingBlock?
+      @endDrag()
+
+  Editor::endDrag = ->
+    @draggingBlock = null
+    @draggingOffset = null
+    @lastHighlight = null
+
+    @clearDrag()
+    @redrawMain()
+    return
+
   # TOUCHSCREEN SUPPORT
   # =================================
 

      @addMicroUndoOperation new CreateSegmentOperation @lassoSegment

      # Move the cursor to the segment we just created
      @moveCursorTo @lassoSegment.end.next, true

      @redrawMain()



      if @inTree(@draggingBlock) and @mainViewOrChildrenContains @draggingBlock, renderPoint
        @draggingBlock.ephemeral = false
        @endDrag()

  # LINE NUMBER GUTTER CODE
  # ================================
