Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

component: Chrome autofill bugfix#2230

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Open
szmagli wants to merge3 commits intojquery-validation:master
base:master
Choose a base branch
Loading
fromszmagli:master

Conversation

szmagli
Copy link

resolve#2228

Description

Thank you!

@staabm
Copy link
Member

Could you elaborate a bit why this change fixes your problem?

The newly added config key is rather cryptic named, I dont know what it does...?

Why do we need this new config flag after alll?

@szmagli
Copy link
Author

Any form element (button, input etc.) inserted by javascript trigger chrome autofill.
I should rename config option to disableSubmitButton.
This should be a new flag becouse this options is required for 'remote' function.

@@ -58,7 +58,7 @@ $.extend( $.fn, {
// - A user defined a `submitHandler`
// - There was a pending request due to `remote` method and `stopRequest()`
// was called to submit the form in case it's valid
if ( validator.submitButton && ( validator.settings.submitHandler || validator.formSubmitted ) && !validator.settings.disableSubmitSec ) {
if ( validator.submitButton && ( validator.settings.submitHandler || validator.formSubmitted ) && !validator.settings.disableHiddenInput ) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

comment above is now outdated.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

Comment changed

@staabm
Copy link
Member

as I read the comment in the source, I am wondering, why you use a form without a explicit submit button?

@szmagli
Copy link
Author

Any variation of form doesn't work (even from example files).

If i doesn't disable this option bydisableHiddenInput this hidden input is created.
I always use submitHandler to process data after validation andvalidator.submitButton always is true

@staabm
Copy link
Member

staabm commentedOct 25, 2018
edited
Loading

hmm not sure this solution is a good fit.@Arkni any opinions/ideas on this?

@szmagli
Copy link
Author

szmagli commentedOct 25, 2018
edited
Loading

I'm also not sure about this solution. When someone change password and doesn't confirm this to chrome when he try to login injecting any button, input etc. restore form fields. I need find way to fix this, not skip.

Why incjecting input is required when user definesubmitHandler?

There was a pending request due toremote method andstopRequest()

This can't be replaced by attribute or store in variable?

@Arkni
Copy link
Member

Hi@szmagli,

I can't test it right now, but could settingautocomplete to"off" (or to a random string) on the hidden input stop the browser from auto filling the other fields?

@szmagli
Copy link
Author

@Arkni i tried but onload aoutocomplete should be on, before i call validation i try to change to off, password field to autocolplete="new-password" but chrome ignore that.

// - A user defined a `submitHandler`
// - There was a pending request due to `remote` method and `stopRequest()`
// was called to submit the form in case it's valid
if ( validator.submitButton && ( validator.settings.submitHandler || validator.formSubmitted ) ) {
if ( validator.submitButton && ( validator.settings.submitHandler || validator.formSubmitted )&& !validator.settings.disableHiddenInput) {
hidden = $( "<input type='hidden'/>" )
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

Arknis idea was to add autocomplete off to this input which is beeing injected

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

it doesn't work neither

Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

@staabmstaabmstaabm left review comments

Assignees
No one assigned
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

Chrome - saved password restored after submitHandler.
3 participants
@szmagli@staabm@Arkni

[8]ページ先頭

©2009-2025 Movatter.jp