Page MenuHomePhabricator

Menu of DropdownWidget with $overlay has padding at bottom
Open, Needs TriagePublic

Description

Steps to reproduce:

  1. Go to https://doc.wikimedia.org/oojs-ui/master/js/#!/api/OO.ui.DropdownWidget
  2. Confirm in the Live Preview that the dropdown behaves as expected.
  3. Edit the code to include the line $overlay: $( 'body' ), to the config of the DropdownWidget.
  4. View Live Preview again.

Expected: As before.
Actual: At the bottom of the dropdown menu there is a small gray bar, the menu also is a few pixels to wide.

Event Timeline

Caused by setting overflow-x: scroll

BTW, this doesn't happen for $overlay: true (and the code where I used the body as overlay predates the default overlay), so there is an easy workaround.