     if editing
       done = $rootScope.$on '$locationChangeStart', (event, url) ->
         return if url.contains(slot.editRoute())
-        return display.cancelRouteChange(event) unless confirmDirty()
+        return display.cancelRouteChange(event) if stayDirty($flow?.isUploading())
         done()
 ])

      $scope.current.editExcerpt() if $scope.current?.excerpts

    $scope.fileAdded = (file) ->
      (!$scope.current?.file && $scope.current || blank).upload(file) if editing
      return


      selection: if 'select' of target then new Segment(target.select) else Segment.empty
      position: Offset.parse(target.pos)

    $flow = undefined
    video = undefined
    blank = undefined

