Edit style: fix goto next/prev section after deleting one
This commit is contained in:
parent
556c8746f6
commit
8844b71aab
7
edit.js
7
edit.js
|
@ -177,7 +177,12 @@ function removeAppliesTo(event) {
|
|||
}
|
||||
|
||||
function removeSection(event) {
|
||||
event.target.parentNode.parentNode.removeChild(event.target.parentNode);
|
||||
var section = event.target.parentNode;
|
||||
var cm = section.querySelector(".CodeMirror-wrap");
|
||||
if (cm && editors.indexOf(cm.CodeMirror) >= 0) {
|
||||
editors.splice(editors.indexOf(cm.CodeMirror), 1);
|
||||
}
|
||||
section.parentNode.removeChild(section);
|
||||
makeDirty();
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user