Page MenuHomePhabricator

OO.ui.ButtonInputWidget based on <input> differs in height from other buttons
Closed, ResolvedPublic

Description

Example code:

var button1 = new OO.ui.ButtonInputWidget( {
    label: 'Button 1'
} );
var button2 = new OO.ui.ButtonInputWidget( {
    label: 'Button 2',
    useInputTag: true
} );
var button3 = new OO.ui.ButtonWidget( {
    label: 'Button 3'
} );
$( 'body' ).append( button1.$element, button2.$element, button3.$element );

Note that the height of button 2 is a little bit smaller than the other two buttons. It should have the same height instead, to make the different buttons visibly interchangeable.

I noticed this while adapting a user script for the new OOjs UI layout of the edit page. As the documentation says, I'd prefer to use an OO.ui.ButtonWidget, but since the other buttons use input tags, I had to use an input tag for my button, too, to have it match the height of the other buttons.

Event Timeline

This was broken once a long time ago, but we fixed it. Someone must have unfixed it recently. This is not an issue e.g. in this super-old version: https://doc.wikimedia.org/oojs-ui/v0.12.8/demos/

Change 356117 had a related patch set uploaded (by VolkerE; owner: VolkerE):
[oojs/ui@master] WikimediaUI theme: Align ButtonInputWidget's line-height to ButtonWidget

https://gerrit.wikimedia.org/r/356117

Change 356117 merged by jenkins-bot:
[oojs/ui@master] WikimediaUI theme: Align ButtonInputWidget's line-height to ButtonWidget

https://gerrit.wikimedia.org/r/356117

Volker_E claimed this task.
Volker_E triaged this task as Medium priority.
Volker_E moved this task from Reviewing to OOjs-UI-0.22.0 on the OOUI board.
Volker_E edited projects, added OOUI (OOjs-UI-0.22.0); removed OOUI.
Volker_E removed a project: Patch-For-Review.
Volker_E removed a subscriber: gerritbot.