PrimeFaces disable submit on pressing enter key.
I’m, running PrimeFaces 5.1 running on WildFly 8.2 Final.
I have dialog, with two inputNumbers and two butt
I think you use JavaScript to capture the enter key press and do nothing.
Ref: https://stackoverflow.com/a/5486046/201891
return false;
cancels an event across browsers if called at the end of an event handler attribute in the HTML. This behaviour is not formally specified anywhere as far as I know.
Ref: https://stackoverflow.com/a/1648854/201891
Update
It sounds like you want to disable the Enter key only when focus is in a particular field. You can write a Javascript method for that too and bind it to onkeypress
. Write a Javascript method something like "if the enter key was pressed and the focus is in this field, return false; otherwise, return true".