mirror of
https://github.com/FoggedLens/iD.git
synced 2026-03-31 17:20:30 +02:00
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.
This commit is contained in:
@@ -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')
|
||||
|
||||
Reference in New Issue
Block a user