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

HTMLFormElement.requestSubmit lacks browser support #1111

Closed
thekaveman opened this issue Nov 1, 2022 · 1 comment · Fixed by #1112
Closed

HTMLFormElement.requestSubmit lacks browser support #1111

thekaveman opened this issue Nov 1, 2022 · 1 comment · Fixed by #1112
Assignees
Labels
bug Something isn't working

Comments

@thekaveman
Copy link
Member

thekaveman commented Nov 1, 2022

In #1071 we introduced a programmatic reCAPTCHA challenge to ensure our HTML5 form validation was taking place.

In #1088 we added the spinner animation to certain buttons, and in doing so, worked through a problem introduced in #1071 where the Javascript .submit() on a form element wasn't triggering the submit event. The solution using .requestSubmit() does generate the submit event and it all worked as expected.

However some key browsers/versions don't yet support the .requestSubmit() method. Specifically, iPhone Safari until version 16, which was only released in September 2022.

More on caniuse.com

To Reproduce

Steps to reproduce the behavior:

  1. Using an iPhone with Safari < 16.0 (e.g. 15.6), go to the dev site
  2. Navigate to the Benefit selection screen
  3. Choose an option, click "Choose this Benefit"
  4. Form does not submit, see error in browser console:

image

Expected behavior

The form should submit on all browsers/devices.

Desktop (please complete the following information)

  • Device: MacBook Pro
  • Browser: Safari
  • Version: 15.6

Smartphone (please complete the following information)

  • Device: iPhone SE
  • Browser: Safari
  • Version: 15.6
@thekaveman thekaveman added the bug Something isn't working label Nov 1, 2022
@thekaveman thekaveman added this to the Courtesy Cards milestone Nov 1, 2022
@thekaveman thekaveman self-assigned this Nov 1, 2022
@thekaveman thekaveman moved this to In Progress in Digital Services Nov 1, 2022
@machikoyasuda
Copy link
Member

Was able to reproduce on my MacBook Pro / Safari 15

image

Repository owner moved this from In Progress to Done in Digital Services Nov 2, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

2 participants