Commit b24cc721 authored by csillag's avatar csillag

Don't open/collapse annotation cards on text selection.

Fixes #788
parent 910d5c6b
......@@ -211,9 +211,16 @@ tabReveal = ['$parse', ($parse) ->
thread = ['$timeout', ($timeout) ->
link: (scope, elem, attr, ctrl) ->
childrenEditing = {}
sel = window.getSelection()
scope.toggleCollapsedDown = (event) ->
event.stopPropagation()
scope.oldSelection = sel.toString()
scope.toggleCollapsed = (event) ->
event.stopPropagation()
# If we have selected something, then don't bother
return unless sel.toString() is scope.oldSelection
$timeout ->
return unless Object.keys(childrenEditing).length is 0
scope.collapsed = !scope.collapsed
......
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