Commit 0011f4c7 authored by tleb's avatar tleb
Browse files

Only register onchange once the submit button has been pressed

parent 13312e98
Pipeline #2094 passed with stage
in 38 minutes and 8 seconds
...@@ -188,14 +188,12 @@ ...@@ -188,14 +188,12 @@
} }
submit.addEventListener('click', () => { submit.addEventListener('click', () => {
if (!submitPressed) {
easymde.codemirror.on('change', checkMarkdownInput)
}
submitPressed = true submitPressed = true
checkMarkdownInput() checkMarkdownInput()
}) })
easymde.codemirror.on('change', () => {
if (submitPressed) {
checkMarkdownInput()
}
})
}) })
</script> </script>
</div> </div>
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment