For example, of the Commerce 'cart' form, there are 2 submit buttons 'Update cart' and 'Checkout'.
If you click 'Checkout' (2nd submit button) the backend treats it like you clicked the 1st button (Update cart).
This is due to how the submit input elements are rendered.
I've changed the input--submit.html.twig to look like this instead to get it to work:
{{ attributes.value|render }}
I'll try and submit a patch if i get a little extra time.
But as you can see, the input should be outside of the , not inside it.
Comments
Comment #3
iamdroid commentedFixed.
Adam Clarey, I believe the root of the problem was different. Yes, it can be fixed your way but the point was to have an input inside the button. Yes, not an elegant solution but it is the only way to have the markup required by material-components-web.
In this case, the problem was caused by
visually-hiddenclass. Somehow it prevent js of sendingopproperty to determine the button.