Form submissions dropped on safari mobile when using action tag and not calling event.preventDefault() in onSubmit handler

I figured out how to fix my problem but posting here in case anyone else has this issue…

I had some users tell me that they had submitted their forms but I didn’t see their submissions in the dashboard (they weren’t in the spam section either).

I think they were all mobile safari users.

My form had a custom action="/success" page defined, and an onSubmit={this.handleSubmit} handler that made the fetch call to POST the data to netlify.

I was not calling e.preventDefault() within my onSubmit handler. Even though users were taken to the success page, if they were on mobile safari the data wasn’t going through.

When I hooked up my phone to my computer and accessed the logs I saw I was getting a TypeError: cancelled when I submitted the form. (This only happened some of the time!)

By adding e.preventDefault() and then manually navigating to the success page after the POST returned successfully, I resolved this issue. Now all my form submissions go through.

actually it’s still failing on some android phones… will have to figure out what’s wrong

hi @teakwood - thanks for doing all this investigating. I’ll touch base with the team and see if we are aware of any issues as you are describing. If you find out anything more, please keep us posted - this is super helpful for other users.



hey there @teakwood , are you still seeing this issue that you described? We’re intrigued, but we need to have some more information before we can take a closer look to see whether this is a bug.

Can you verify that this is still a concern, do you have an instance name, or some code we can look at?

If we have a reproducible scenario we can take another look. thanks much!

Also would be useful to have the URL for your form so we can test it directly :slight_smile:

@fool @perry thanks for the help, I dropped it for the time being because only 2 people (on android) were having issues and I couldn’t reproduce it.

sounds good, we will close this ticket for now, and if it resurfaces, go ahead and make a new one with some code and a live site and we will dig in further. :muscle: