Prefer parentNode over parentElement because IE (closes #2910)

This commit is contained in:
Bryan Housel
2016-01-13 00:04:59 -05:00
parent 70aa850ffc
commit ce9c480498
2 changed files with 4 additions and 4 deletions
+3 -3
View File
@@ -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);
});
}
+1 -1
View File
@@ -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);
});