Option preventEnterSubmission disables linebreaks in child textareas
Hi there,
I just encountered an issue regarding the option preventEnterSubmission which disables enter submissions in all child inputs. I believe this behaviour isn't intended for textareas. I suggest updating the handleKeyDown method as follows:
// handles keydown on enter being pressed in any Child component input area. in this case it goes to the next
handleKeyDown(evt) {
if (evt.which === 13) {
if (!this.props.preventEnterSubmission && evt.target.type != 'textarea') {
this.next();
}
else if(evt.target.type != 'textarea') {
evt.preventDefault();
}
}
}
@johannesengl this is indeed a bug. Let me confirm and fix.
@johannesengl I've fixed it and pushed v4.4.8. Please reinstall via npm and test and let me know.
Thanks!
@johannesengl losing this as I've not heard any confirmation. Please reopen if the issue persists.
Hi @newbreedofgeek I have a problem with that, in my first step I have a search input and want to search using enter key but if preventEnterSubmission is disable it won't work and if I set preventEnterSubmission to true it goes to the second page