mirror of
https://github.com/FoggedLens/iD.git
synced 2026-05-16 13:59:27 +02:00
Prefer parentNode over parentElement because IE (closes #2910)
This commit is contained in:
@@ -64,7 +64,7 @@ iD.ui.Conflicts = function(context) {
|
||||
function showConflict(selection, index) {
|
||||
if (index < 0 || index >= list.length) return;
|
||||
|
||||
var parent = d3.select(selection.node().parentElement);
|
||||
var parent = d3.select(selection.node().parentNode);
|
||||
|
||||
// enable save button if this is the last conflict being reviewed..
|
||||
if (index === list.length - 1) {
|
||||
@@ -172,7 +172,7 @@ iD.ui.Conflicts = function(context) {
|
||||
.attr('type', 'radio')
|
||||
.attr('name', function(d) { return d.id; })
|
||||
.on('change', function(d, i) {
|
||||
var ul = this.parentElement.parentElement.parentElement;
|
||||
var ul = this.parentNode.parentNode.parentNode;
|
||||
ul.__data__.chosen = i;
|
||||
choose(ul, d);
|
||||
});
|
||||
@@ -183,7 +183,7 @@ iD.ui.Conflicts = function(context) {
|
||||
|
||||
choices
|
||||
.each(function(d, i) {
|
||||
var ul = this.parentElement;
|
||||
var ul = this.parentNode;
|
||||
if (ul.__data__.chosen === i) choose(ul, d);
|
||||
});
|
||||
}
|
||||
|
||||
@@ -49,7 +49,7 @@ iD.ui.SelectionList = function(context, selectedIDs) {
|
||||
// Update
|
||||
items.selectAll('use')
|
||||
.attr('href', function() {
|
||||
var entity = this.parentElement.parentElement.__data__;
|
||||
var entity = this.parentNode.parentNode.__data__;
|
||||
return '#icon-' + context.geometry(entity.id);
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user