diff --git a/edit/applies-to-line-widget.js b/edit/applies-to-line-widget.js index c1597eb4..80a842b7 100644 --- a/edit/applies-to-line-widget.js +++ b/edit/applies-to-line-widget.js @@ -303,8 +303,7 @@ function createAppliesToLineWidget(cm) { ); setupApplyMarkers(newApply); applies.splice(i + 1, 0, newApply); - const li = this.closest('li'); - li.parentNode.insertBefore(makeLi(newApply), li.nextSibling); + this.closest('li').insertAdjacentElement('afterend', makeLi(newApply)); } }); return [typeInput, valueInput, regexpTestButton, removeButton, addButton];