aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/editor.mjs
diff options
context:
space:
mode:
Diffstat (limited to 'src/editor.mjs')
-rw-r--r--src/editor.mjs4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/editor.mjs b/src/editor.mjs
index ad1a863..f6c7dab 100644
--- a/src/editor.mjs
+++ b/src/editor.mjs
@@ -32,7 +32,7 @@ new window.MutationObserver(mutaions => {
32 const mutation = mutaions.at(-1) 32 const mutation = mutaions.at(-1)
33 const layout = dumbyContainer.dataset.layout 33 const layout = dumbyContainer.dataset.layout
34 if (layout !== 'normal' || mutation.oldValue === 'normal') { 34 if (layout !== 'normal' || mutation.oldValue === 'normal') {
35 delete context.dataset.mode 35 context.dataset.mode = ''
36 } 36 }
37}).observe(dumbyContainer, { 37}).observe(dumbyContainer, {
38 attributes: true, 38 attributes: true,
@@ -92,7 +92,7 @@ new window.MutationObserver(() => {
92const toggleEditing = () => { 92const toggleEditing = () => {
93 const mode = context.dataset.mode 93 const mode = context.dataset.mode
94 if (mode === 'editing') { 94 if (mode === 'editing') {
95 delete context.dataset.mode 95 context.dataset.mode = ''
96 } else { 96 } else {
97 context.dataset.mode = 'editing' 97 context.dataset.mode = 'editing'
98 } 98 }