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')