From 62378007b1349b21a317d385994ae7acbe7418c1 Mon Sep 17 00:00:00 2001 From: Magnus Hovland Hoff Date: Mon, 24 Sep 2018 18:21:50 +0200 Subject: [PATCH] Reset theme when editing is canceled --- assets/script.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/assets/script.js b/assets/script.js index 0b235a6..0fb3615 100644 --- a/assets/script.js +++ b/assets/script.js @@ -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}`; } }); }