   $(document).on 'dragenter', (e) ->
     e.preventDefault()
 
+    DRAGGING_OVER_DOM = true
+    setTimeout () ->
+      DRAGGING_OVER_DOM = false
+    , 5
+
     if Meteor.personId()
       Session.set 'importOverlayActive', true
     else

ImportingFiles = new Meteor.Collection null

UPLOAD_CHUNK_SIZE = 128 * 1024 # bytes

verifyFile = (file, fileContent, publicationId, samples) ->
  samplesData = _.map samples, (sample) ->


  'dragleave': (e, template) ->
    e.preventDefault()

    unless DRAGGING_OVER_DOM
      Session.set 'loginOverlayActive', false

  'drop': (e, template) ->
    e.stopPropagation()
