climbjios-sg / climbjios-app

The community for climbers 🧗
https://www.climbjios.com/
GNU General Public License v3.0
25 stars 4 forks source link

Hitting the enter key when entering name during onboarding reloads the page instead of going to the next page #250

Closed nathantew14 closed 1 year ago

nathantew14 commented 1 year ago

Describe the bug Hitting the enter key when entering name during onboarding reloads the page instead of going to the next page.

To Reproduce Steps to reproduce the behavior:

  1. Go to the onboarding page
  2. Enter any text in the name field
  3. Press the enter key on keyboard (on desktop)
  4. Page reloads instead of going to the next page

Screenshots

Screenshot 2022-12-22 at 9 00 52 AM

Desktop (please complete the following information):

nathantew14 commented 1 year ago

Seems like the easiest fix is to add a second hidden field: https://stackoverflow.com/questions/1370021/why-does-forms-with-single-input-field-submit-upon-pressing-enter-key-in-input

therizhao commented 1 year ago

@nathantew14 this is done right?

nathantew14 commented 1 year ago

@nathantew14 this is done right?

Should be bah, if this pr is also updated in the prod version. Idk how to check without another tele account to see the onboarding form leh 😅