Commit 5788de25 authored by csillag's avatar csillag

Clear selection when clicking on the adder button.

As discussed in https://github.com/hypothesis/annotator/pull/78.

Fixes https://github.com/hypothesis/h/issues/1598.
parent 81e0e9bf
......@@ -354,6 +354,7 @@ class Annotator.Guest extends Annotator
event.stopPropagation()
@adder.hide()
annotation = this.setupAnnotation(this.createAnnotation())
Annotator.util.getGlobal().getSelection().removeAllRanges()
this.showEditor(annotation)
onSetTool: (name) ->
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment