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

Override function focusInvalid [Moved from #1456] #2172

Open
Arkni opened this issue May 28, 2018 · 6 comments
Open

Override function focusInvalid [Moved from #1456] #2172

Arkni opened this issue May 28, 2018 · 6 comments

Comments

@Arkni
Copy link
Member

Arkni commented May 28, 2018

@bytestream wrote:

@staabm any insight on this based on what I referenced above?

For arguments sake, I've updated @subsecond jsfiddle to the latest release (1.17.0)

Using .focus() in the invalidHandler: https://jsfiddle.net/kfopux67/51/
Using focusInvalid: true: https://jsfiddle.net/kfopux67/52/

To replicate:

  1. Type test@test.com into email field
  2. Press ENTER key

Actual Result:
Form submits by itself

Expected Result:
Validation message shows stating password is required

@Arkni
Copy link
Member Author

Arkni commented May 28, 2018

@bytestream

I will look into this issue as soon as possible.

@Arkni
Copy link
Member Author

Arkni commented Jun 19, 2018

Hi @bytestream,

Just to make sure I understand the issue very well, should I expect the second example (your second fiddle) to submit the form if I pressed ENTER key? because it deosn't.

@bytestream
Copy link
Member

@Arkni in the second example, if you enter an email address and hit ENTER then it says the password field is required. If you then enter a password and hit ENTER the form submits. As far as I'm concerned the second fiddle works as expected.

The issue is that the first fiddle submits the form after you enter an email address and hit ENTER. I would expect it to say the password field is required and prevent form submission - the same as above (second fiddle).

I described the code flow here for the first fiddle: proengsoft/laravel-jsvalidation#323

I hope this clears things up.

@Arkni
Copy link
Member Author

Arkni commented Jun 19, 2018

Hi @bytestream,

Thanks a lot for the details. I'll mark this issue as bug and will investigate further and try to fix it as soon as I got some free time.

@rupertlustosa
Copy link

Hello friends, any prediction of analyzing this problem?

@Arkni
Copy link
Member Author

Arkni commented Feb 15, 2019 via email

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

No branches or pull requests

3 participants