Use parentNode instead of parentElement for IE

This commit is contained in:
Bryan Housel
2019-05-07 17:48:56 -04:00
parent 3d9f7244f0
commit 58cae43b9b
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -197,7 +197,7 @@ export function uiPresetList(context) {
function itemKeydown(){
// the actively focused item
var item = d3_select(this.closest('.preset-list-item'));
var parentItem = d3_select(item.node().parentElement.closest('.preset-list-item'));
var parentItem = d3_select(item.node().parentNode.closest('.preset-list-item'));
// arrow down, move focus to the next, lower item
if (d3_event.keyCode === utilKeybinding.keyCodes['↓']) {
+1 -1
View File
@@ -514,7 +514,7 @@ export function uiToolSearchAdd(context) {
if (shouldExpand) {
var subitems = item.subitems();
var selector = '#' + itemSelection.node().id + ' + *';
item.subsection = d3_select(itemSelection.node().parentElement).insert('div', selector)
item.subsection = d3_select(itemSelection.node().parentNode).insert('div', selector)
.attr('class', 'subsection subitems');
var subitemsEnter = item.subsection.selectAll('.list-item')
.data(subitems)