Open sebastien-comeau opened 5 days ago
We have some lightweight code that attempts to detect lack of submitter
support here. Any chance you'd be willing to do some step through debugging in there to see if you can help identify where that's not working right in those cases?
There is also a more extensive polyfill available in https://github.com/jenseng/formdata-submitter-polyfill that may solve the issue for you
Reproduction
Here is my reproduction repository: GitHub, based on Remix's Multiple Forms example. My repo uses the latest version of Remix, and I was able to reproduce the issue in both Remix v1 and v2. The issue seems to occur with browsers that do not support the SubmitEvent: submitter property. I reproduced it with Firefox 74 since I can't install Safari on Windows.
We are aware that these are older browsers, but our application must support them to serve Canadian citizens, and it is challenging to force users to update their browsers. Safari 15.4 was released on March 14, 2022, and we believe supporting at least Safari 15 is necessary. User metrics indicate this issue also occurs with other browsers that lack submitter support, including:
System Info
Used Package Manager
npm
Expected Behavior
When a page in Remix contains multiple actions and a user submits a form, the form data should include the
intent
key, with the value corresponding to the intent value of the action submitter.Actual Behavior
The actual behavior is that the
intent
key is not present in the form data.