Buttons can associate to forms that they are a descendant of, or forms that have an id specified by the form attribute.
So can form associated custom buttons in Chrome (107), see for example this sandbox: https://codesandbox.io/s/loving-lena-p56owk?file=/index.html . Both the button inside the form, as well as the one specified by the form attribute can find the form it is associated to. (printed to the console on click).
However, in browsers that require this polyfill, such as Safari, only the form associated button that is a descendant of the form can properly find its form.
Buttons can associate to forms that they are a descendant of, or forms that have an id specified by the
formattribute.So can form associated custom buttons in Chrome (107), see for example this sandbox: https://codesandbox.io/s/loving-lena-p56owk?file=/index.html . Both the button inside the form, as well as the one specified by the
formattribute can find the form it is associated to. (printed to the console on click).However, in browsers that require this polyfill, such as Safari, only the form associated button that is a descendant of the form can properly find its form.