 normalizeStartEnd = (start, end) ->
   [Math.min(start, end), Math.max(start, end)]
 
-hideHiglight = ($textLayer) ->
+removeTemporaryAnnotation = ->
+  $highlightedAnnotation = $('#viewer .display .annotations .highlighted')
+  if $.trim($highlightedAnnotation.text()) is "Enter annotation"
+    annotation = $highlightedAnnotation.data 'annotation'
+    Annotations.remove annotation._id if annotation
+
+hideHiglight = ($textLayer, dontRemove) ->
   $textLayer.children().removeClass 'highlighted'
 
-showHighlight = ($textLayer, start, end) ->
-  hideHiglight $textLayer
+  removeTemporaryAnnotation() unless dontRemove
+
+showHighlight = ($textLayer, start, end, dontRemove) ->
+  hideHiglight $textLayer, dontRemove
 
   return if start is -1 or end is -1
 

    start: start
    end: end

closeHighlight = (publication, page, $textLayer, start, end) ->
  hideHiglight $textLayer

  Session.set 'currentHighlight', null


    offset = $textLayer.offset()
    if highlightStartPosition.left is e.pageX - offset.left and highlightStartPosition.top is e.pageY - offset.top
      closeHighlight publication, page, $textLayer
    else
      openHihglight publication, page, $textLayer, highlightStartIndex, highlightEndIndex

