So it seems like pressing enter always submits a form request. I believe the expected behavior is only when there is one input in a form. But the main issue is just that it submits for textarea inputs instead of allowing the user to continue typing which is the expected behavior of a textarea.
So it seems like pressing enter always submits a form request. I believe the expected behavior is only when there is one input in a form. But the main issue is just that it submits for textarea inputs instead of allowing the user to continue typing which is the expected behavior of a textarea.
If there is a submit button, or if there's no submit button and there's only 1 blocking input, then Enter in an input will always submit the form.
If there's no submit button and there are 2 blocking inputs, Enter will never submit the form.
Enter in a textarea will never submit the form.
So the textarea issue is definitely a bug. The input issue is not, if your form has a submit button.
I'm going to remove the unnecessary keyup event listener, and let the browser make the decision when to submit the form.
Based on the [spec](https://html.spec.whatwg.org/multipage/form-control-infrastructure.html#implicit-submission):
* If there is a submit button, or if there's no submit button and there's only 1 blocking input, then Enter in an input will always submit the form.
* If there's no submit button and there are 2 blocking inputs, Enter will never submit the form.
* Enter in a textarea will never submit the form.
So the textarea issue is definitely a bug. The input issue is not, if your form has a submit button.
I'm going to remove the unnecessary `keyup` event listener, and let the browser make the decision when to submit the form.
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
So it seems like pressing enter always submits a form request. I believe the expected behavior is only when there is one input in a form. But the main issue is just that it submits for textarea inputs instead of allowing the user to continue typing which is the expected behavior of a textarea.
Based on the spec:
So the textarea issue is definitely a bug. The input issue is not, if your form has a submit button.
I'm going to remove the unnecessary
keyupevent listener, and let the browser make the decision when to submit the form.