From 223974d6a74aca26de12f9ea9677b33cee2ad316 Mon Sep 17 00:00:00 2001 From: John Firebaugh Date: Mon, 29 Jul 2013 12:21:35 -0700 Subject: [PATCH] Revert to stopPropagation when suppressing click --- js/lib/d3.v3.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/js/lib/d3.v3.js b/js/lib/d3.v3.js index 1384e8673..23697d206 100644 --- a/js/lib/d3.v3.js +++ b/js/lib/d3.v3.js @@ -521,6 +521,11 @@ function d3_eventPreventDefault() { d3.event.preventDefault(); } +function d3_eventCancel() { + d3.event.preventDefault(); + d3.event.stopPropagation(); +} + function d3_eventSource() { var e = d3.event, s; while (s = e.sourceEvent) e = s; @@ -1383,7 +1388,7 @@ function d3_event_dragSuppress() { style[d3_event_dragSelect] = select; if (suppressClick) { // suppress the next click, but only if it’s immediate function off() { w.on(click, null); } - w.on(click, function() { d3_eventPreventDefault(); off(); }, true); + w.on(click, function() { d3_eventCancel(); off(); }, true); setTimeout(off, 0); } };