Fix: insertBefore -> insertAdjancentElement

This commit is contained in:
eight 2017-11-09 06:57:10 +08:00
parent 3d57fd4158
commit 0c64e6013b

View File

@ -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];