Enter key does not trigger default button - triggers another one instead

Hi all,

I have a page with multiple nested web blocks and buttons, but in the entire page I have only ONE button with the "Is Default" property set to "Yes". However, when focus is on certain inputs inside the web blocks, other random buttons are triggered instead. 

Does the enter key inside an input on a web block only triggers buttons inside that web block scope (even though they are all with "Set Default" set to "No")? It's the only explanation that I'm finding for this...



Can you share an OML that reproduces the issue?

And when you say "random buttons are triggered instead" do you mean that it's not consistent?

Hi Maria Inês Ponces,

Usually it should trigger button for which "Set Default" set to "Yes", but in your case very difficult to say with out seeing the code, better as Andrew suggested share OM file if not confidential.



If I recall correctly, when pressing enter inside an input (type=text, checkbox, radio) of a form (Outsystems wraps a form around the page so you can do submits and such) the browser will look for a button with type=submit to submit the form. 

I'm not sure if Outsystems does something with the default setting though, but in your case it might be that your default button is not a submit type but ajax submit?

Hi Maria,

You need to set IsDefault property to YES if you want that button to be triggered whenever you press Enter key.

I hope it will help you.


Rajat Agrawal

Hi Rajat,

I think Maria has done same thing, his problem is different.

If you can read his post, He has multiple buttons in his page but only one button he has "Set Default" set to "Yes", still other button are getting triggered.

Any idea ?



Hello Maria,

Could you provide a little more detail?

1. What version of OutSystems are we talking about? 9? 10? 11? Other?

2. Are your web blocks inside a Form? Are they in a List? 

3. The web blocks are put directly into the page? Are they inside other Web Blocks?

4. The default button is being put directly into the page or also inside a web block?


Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.