Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

onsubmit is always executed. #8

Open
kapitancho opened this issue Dec 25, 2012 · 1 comment
Open

onsubmit is always executed. #8

kapitancho opened this issue Dec 25, 2012 · 1 comment

Comments

@kapitancho
Copy link

If I run this on chrome, I get the alert ONLY when there is a value in the required field.

If I use h5Validate, I always see the alert. That's not consistent. In my opinion, the alert message should be shown only if the form is valid (like it happens in Chrome)

How to reproduce:
Just add
onsubmit="alert(123)"
for any form in the demos

@zoltan-dulac
Copy link
Owner

@kapitancho: I am assuming you mean html5Forms.js and not h5Validate, since that is a different project. :-)

I have an example of html5Forms.js with the usecase you mention here:

http://www.useragentman.com/tests/html5Forms/tests/html5Forms/patternRequired-onsubmit.html

You are correct. Browsers that have a full native implementation of the official HTML5 Forms module (like Chrome and Firefox) will not produce the alert, while html5Forms.js produces the alert. Thanks for "alerting" me to this issue :-) ... will look into fixing this in a subsequent release soon.

Z.

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

No branches or pull requests

2 participants