Fixing <a> click inside description

stable
Alejandro Alonso 2014-10-22 16:34:07 +02:00 committed by David Barragán Merino
parent f8c45ca719
commit ad0121061e
1 changed files with 4 additions and 2 deletions

View File

@ -520,8 +520,10 @@ EditableDescriptionDirective = ($rootscope, $repo, $confirm, $compile, $loading)
$el.off() $el.off()
$el.on "click", ".view-description", (event) -> $el.on "click", ".view-description", (event) ->
target = angular.element(event.currentTarget) # We want to dettect the a inside the div so we use the target and
if target.not('a') # not the currentTarget
target = angular.element(event.target)
if not target.is('a')
$el.find('div.edit-description').show() $el.find('div.edit-description').show()
$el.find('div.view-description').hide() $el.find('div.view-description').hide()
$el.find('textarea').focus() $el.find('textarea').focus()