Skip to content
This repository has been archived by the owner on Mar 20, 2021. It is now read-only.

form loosing attribute after submit #4399

Open
HowardUngar opened this issue May 20, 2019 · 0 comments
Open

form loosing attribute after submit #4399

HowardUngar opened this issue May 20, 2019 · 0 comments

Comments

@HowardUngar
Copy link

The form tag is loosing attributes after the form is submitted. In particular we have the following in our jsf source to disable the enter key:

<h:form onkeydown="if (event.keyCode === 13) { return false; }">

When the form initially renders the browser shows the onkeydown attribute. However, after the form is submitted, the onkeydown attribute is no longer shown in the browser.

The submit button is a standard h:commandButton without any ajax and the action returns void.

Note that in addition to the onkeydown attribute, the enctype attribute also disappears. This attribute is not specified in our jsf source code but is visible in the browser as enctype="application/x-www-form-urlencoded" when the form is initially rendered. But after the form is submitted, the browser no longer shows the enctype attribute or the onkeydown attribute.

We are running JSF Mojarra 2.3.5.SP2-redhat-00001 on JBoss EAP 7.2. The problem was not evident on a prior version of Mojarra that we are currently running in production: Mojarra 2.2.10 running on JBoss EAP 6.4.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant