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 with button does not return value as returnValue #69

Closed
seralo opened this issue Aug 13, 2015 · 0 comments
Closed

Form with button does not return value as returnValue #69

seralo opened this issue Aug 13, 2015 · 0 comments

Comments

@seralo
Copy link

seralo commented Aug 13, 2015

ReturnValue is not set to the BUTTON value parameter on form submission.

When we press "Yes" in the following example dialog.close(undefined) is called instead of dialog.close('yes')

<dialog id="dialog">
  <form method="dialog">
    <p>Do you agree with terms of use?</p>
    <textarea class="form-control" disabled>Lorem ipsum dolor sit amet,....</textarea>
    <button type="submit" value="yes">Yes</button>
    <button type="submit" value="no" autofocus>No</button>
  </form>
</dialog>

Proposed fix: in the submit handler accept either 'INPUT' or 'BUTTON' nodeName.

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