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); setupApplyMarkers(newApply);
applies.splice(i + 1, 0, newApply); applies.splice(i + 1, 0, newApply);
const li = this.closest('li'); this.closest('li').insertAdjacentElement('afterend', makeLi(newApply));
li.parentNode.insertBefore(makeLi(newApply), li.nextSibling);
} }
}); });
return [typeInput, valueInput, regexpTestButton, removeButton, addButton]; return [typeInput, valueInput, regexpTestButton, removeButton, addButton];