summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Bruederli <bruederli@kolabsys.com>2013-11-01 16:59:13 (GMT)
committerThomas Bruederli <bruederli@kolabsys.com>2013-11-01 16:59:41 (GMT)
commita54f1dc395a7f762c1d9345c0d3ee5e5a8cbd853 (patch)
tree56ad458fe200f01e84c819642ae6997aa89291b5
parent2784e1a2dd79de0a13fe4cf75ce1d6ce8733d6a3 (diff)
downloadroundcubemail-plugins-kolab-a54f1dc395a7f762c1d9345c0d3ee5e5a8cbd853.tar.gz
Allow clicks on all tags <li> and nested elements (#2458)
-rw-r--r--plugins/tasklist/tasklist.js8
1 files changed, 4 insertions, 4 deletions
diff --git a/plugins/tasklist/tasklist.js b/plugins/tasklist/tasklist.js
index 25ab68d..48965f4 100644
--- a/plugins/tasklist/tasklist.js
+++ b/plugins/tasklist/tasklist.js
@@ -175,12 +175,12 @@ function rcube_tasklist_ui(settings)
// click-handler on tags list
$(rcmail.gui_objects.tagslist).click(function(e){
- if (e.target.nodeName != 'LI')
- return false;
-
- var item = $(e.target),
+ var item = e.target.nodeName == 'LI' ? $(e.target) : $(e.target).closest('li'),
tag = item.data('value');
+ if (!tag)
+ return false;
+
// reset selection on regular clicks
var index = $.inArray(tag, tagsfilter);
var shift = e.shiftKey || e.ctrlKey || e.metaKey;