Reset theme when editing is canceled

This commit is contained in:
Magnus Hovland Hoff 2018-09-24 18:21:50 +02:00
parent 3bbe5840ee
commit 62378007b1

View file

@ -168,6 +168,9 @@ function openEditor() {
if (doReset) {
container.classList.remove('edit');
form.reset();
let selectedTheme = form.querySelector(`.theme-picker--option[checked]`).value;
bodyElement.className = `theme-${selectedTheme}`;
}
});
}