|mediawiki/core : master||MediaWiki UI: Set `max-width` on `.mw-ui-input-inline` elements|
FYI: Please always include a link to where you are encountering such a problem.
The cause seems to be that input elements get a width:auto hint, which make it basically equal to the size attribute. Since the size attribute tells it to be wider than the page, it does so. Can be mitigated by adding max-width: 100% to the element, to tell it to never be wider than it's parent.
Should probably be added to core OOjs UI styling.