mirror of
https://github.com/ae-utbm/sith.git
synced 2024-11-26 11:04:20 +00:00
Only register onchange once the submit button has been pressed
This commit is contained in:
parent
13312e9879
commit
0011f4c7b0
@ -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>
|
||||||
|
Loading…
Reference in New Issue
Block a user