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

Form POST processing fails to properly handle multiselects #14

Open
farmerpaul opened this issue May 6, 2013 · 0 comments
Open

Form POST processing fails to properly handle multiselects #14

farmerpaul opened this issue May 6, 2013 · 0 comments

Comments

@farmerpaul
Copy link

If your form has a multiselect (<select multiple>), then the form processing done by History.js fails to read its selected values correctly. The issue is on this line:

    for (var i = 0, len = elements.length, el; i < len; i++) {
      el = elements[i]
      var name = el.name
      if (!name) continue
      var value = el.value // <== breaks with <select multiple>
      ...

I think that just returns the first selected element, which isn't usually what you want...

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