From 22bc6827aeed14912d76f59c9783716bd33758e2 Mon Sep 17 00:00:00 2001 From: Ingo Schommer Date: Mon, 30 Nov 2009 00:44:27 +0000 Subject: [PATCH] BUGFIX Fixed drag link event handling on ComplexTableField.js (#4737) (from r93754) git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@93940 467b73ca-7a2a-4603-9d3b-597d59a354a9 --- javascript/ComplexTableField.js | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/javascript/ComplexTableField.js b/javascript/ComplexTableField.js index a91cbf046..ef48447fb 100755 --- a/javascript/ComplexTableField.js +++ b/javascript/ComplexTableField.js @@ -20,6 +20,13 @@ ComplexTableField.prototype = { if(defaultAction) { rules['#'+this.id+' table.data tbody td'] = { onclick: function(e) { + var elt = Event.element(e); + // Check the tag, as otherwise this + // function can take over checkbox + // click actions etc. See ticket #4737 + if (elt.tagName != 'TD' && elt.tagName != 'TR') { + return; + } var link = $$('.'+defaultAction, Event.element(e).parentNode)[0].href; this.openPopup(null, link); return false; @@ -133,4 +140,4 @@ ComplexTableField.prototype = { } } -ComplexTableField.applyTo('div.ComplexTableField'); \ No newline at end of file +ComplexTableField.applyTo('div.ComplexTableField');