The problem was both forms had id #form and there was nothing to prevent the default browser behavior when submitting the second form. I gave them more descriptive id's so it's clear which is being referred to.
The other solution would have been to no longer have it as a form, but I kept it because having it as a form and the button being of type submit is convenient because the default browser behavior is that enter will trigger a click on that button (so we don't have to have a keypress listener).
This fixes #112
The problem was both forms had id
#form
and there was nothing to prevent the default browser behavior when submitting the second form. I gave them more descriptive id's so it's clear which is being referred to.The other solution would have been to no longer have it as a form, but I kept it because having it as a form and the button being of type submit is convenient because the default browser behavior is that enter will trigger a click on that button (so we don't have to have a keypress listener).