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

Radio button event are not correctly handled #89

Open
xavier335659 opened this issue Dec 16, 2015 · 1 comment
Open

Radio button event are not correctly handled #89

xavier335659 opened this issue Dec 16, 2015 · 1 comment

Comments

@xavier335659
Copy link

Localstorage is updated only at first click on a radio button.

See jsfiddle :
https://jsfiddle.net/v9zzcbww/5/

Select one value, then select the second, and go back to the 1srt one. The localstorage will remain on the second value.

@xavier335659
Copy link
Author

Problem is in persist function :
// some binded events are redundant (change & paste for example), persist only once by field val
if ( this.val === this.getVal() ) {
return;
}
The this.val is persisted on each input of the group.
Suggested fix :
// some binded events are redundant (change & paste for example), persist only once by field val
if (!this.$element.is('input[type=radio], input[type=checkbox]') && (this.val === this.getVal())) {
return;
}

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

1 participant