FormLayout, ButtonWidget and ButtonInputWidget have a set of problems caused by preventing default event actions that make them (near) useless if you do not implement *all* behaviors on them in JavaScript. The issue doesn't affect the PHP versions, and it doesn't affect code that fully handles the events.
- FormLayout: We prevent the 'submit' event unconditionally, which means that the underlying HTML <form> element can not actually be submitted.
- ButtonInputWidget: We prevent the 'click' event unconditionally, which means that the button can not be used to submit a form (form 'submit' event is not fired if the 'click' event is prevented).
- ButtonWidget: We do not prevent the 'click' event when a 'href' is given, which is problematic for progressive enhancement ('href' must be removed if the 'click' event is to be handled from JavaScript, which means that the button can no longer be middle-clicked etc.).
- (maybe others?)
We need to allow the OOUI event handlers to decide whether the DOM events should be prevented. Making the current behavior configurable with config options would also help, but might not be sufficient?
Broken reverted attempt at fixing a part of this: https://gerrit.wikimedia.org/r/#/c/191834/