From ad0121061e0a91ba37a6c098eb9e703bcc8e900c Mon Sep 17 00:00:00 2001 From: Alejandro Alonso Date: Wed, 22 Oct 2014 16:34:07 +0200 Subject: [PATCH] Fixing click inside description --- app/coffee/modules/common/components.coffee | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/app/coffee/modules/common/components.coffee b/app/coffee/modules/common/components.coffee index 5a707b30..f1a7c9b2 100644 --- a/app/coffee/modules/common/components.coffee +++ b/app/coffee/modules/common/components.coffee @@ -520,8 +520,10 @@ EditableDescriptionDirective = ($rootscope, $repo, $confirm, $compile, $loading) $el.off() $el.on "click", ".view-description", (event) -> - target = angular.element(event.currentTarget) - if target.not('a') + # We want to dettect the a inside the div so we use the target and + # not the currentTarget + target = angular.element(event.target) + if not target.is('a') $el.find('div.edit-description').show() $el.find('div.view-description').hide() $el.find('textarea').focus()