From 49897680f719dadfdf255b9fca9f7590e6297c8e Mon Sep 17 00:00:00 2001 From: Tom MacWright Date: Thu, 27 Dec 2012 17:46:28 -0500 Subject: [PATCH] Use a selection for remove. Fixes #305. The story behind this one is that Chrome 24+ has a built-in .remove() function on all elements which does the trick of fooling me into thinking that this was a selection. It isn't, and this makes it one. --- js/id/ui/modal.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/js/id/ui/modal.js b/js/id/ui/modal.js index f4ad5ea01..236102987 100644 --- a/js/id/ui/modal.js +++ b/js/id/ui/modal.js @@ -8,7 +8,7 @@ iD.modal = function() { .append('div').attr('class', 'shaded') .style('opacity', 0) .on('click.remove-modal', function() { - if (d3.event.target == this) this.remove(); + if (d3.event.target == this) d3.select(this).remove(); }); shaded.append('div')