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 buttons do not persist correctly #124

Open
burnet opened this issue Aug 20, 2018 · 0 comments
Open

Radio buttons do not persist correctly #124

burnet opened this issue Aug 20, 2018 · 0 comments

Comments

@burnet
Copy link

burnet commented Aug 20, 2018

When using radio buttons and watching localstorage, as the radio buttons change the saved value eventually gets 'stuck' and doesn't change again. The incorrect value is persisted on reload.

Example using current master garlic.js

  <form action="" method="get" data-persist="garlic">
    <label><input type="radio" name="Planet" value="Earth">Earth</label>
    <label><input type="radio" name="Planet" value="Mars">Mars</label>
    <label><input type="radio" name="Planet" value="Saturn">Saturn</label>
  </form>

  <script src="https://code.jquery.com/jquery-2.2.4.min.js"></script>
  <script src="https://rawgit.com/guillaumepotier/Garlic.js/master/garlic.js"></script>

The demo on the Garlic.js website also exhibits the same issue: http://garlicjs.org/

Tested on Windows Chrome 68.0.3440.106 and Firefox 61.0.02

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