PolymerElements / paper-dropdown-menu

A Material Design browser select element
https://www.webcomponents.org/element/PolymerElements/paper-dropdown-menu
61 stars 107 forks source link

On first open, dropdown menu doesn't scroll to selected item until after animation #144

Closed mgiuffrida closed 8 years ago

mgiuffrida commented 8 years ago

Example: 200 items, with the 100th item selected: https://jsfiddle.net/mgiuffrida/8je4wo0d

Expected: when opening the dropdown menu, the 100th item is in the middle of the view, like a <select>

Actual: the first time the dropdown menu is opened, the list is shown starting at 0, and snaps down to the 100th item after the entire animation completes

peteblois commented 8 years ago

Additional jank because the scrollbars don't appear until the animation has completed.

mgiuffrida commented 8 years ago

it's also silly that the vertical scrollbar causes a horizontal scrollbar to be shown

@notwaldorf @bicknellr are these issues with paper-dropdown-menu or paper-listbox?

valdrinkoshi commented 8 years ago

This is related to this other issue on iron-overlay-behavior https://github.com/PolymerElements/iron-overlay-behavior/issues/201 It will get fixed once that issue is fixed (using the PR https://github.com/PolymerElements/iron-overlay-behavior/pull/202) https://jsfiddle.net/wef9087f/ Will close this as we already have that other issue for tracking the bug.