Pressing enter in text boxes triggers save

Hi,

I don't know how it's occured but on one of my screens when you press enter in any textbox it triggers the save method and the record is update. It doesn't happen on other screens. I can't see where I have set this, probably by mistake.

Can you point me in the right direction please?

Thanks.

Hi @Paul_Pitchford,

Possible approach is to set the Save button type to Button instead Submit:

and execute submit manually on Save button Click:

Whilst this is a work around which I accept, I was kind of hoping to find a solution rather than a work around

Can you think as to why this is occurring so I can see where to look?

In HTML standard form with submit button is submitted on enter key by default. Here is the specification:
https://html.spec.whatwg.org/multipage/form-control-infrastructure.html#implicit-submission

That makes sense but it doesn't do it on the other screens.

If you have <form> component with <input type='submit' /> it will work this way in every browser. Here is also a thread discussing the same:

You can check also my ex-colleague blog on the same topic:
https://www.tjvantoll.com/2013/01/01/enter-should-submit-forms-stop-messing-with-that/