PolymerElements / paper-menu-button

An element that allows composing a trigger and content as a dropdown menu.
https://www.webcomponents.org/element/PolymerElements/paper-menu-button
24 stars 46 forks source link

Activating paper-menu-button causes body's scrollbar to disappear #21

Open pdelanauze opened 9 years ago

pdelanauze commented 9 years ago

Easy to test , if there's a vertical scrollbar , trigger the paper-menu-button , the scrollbar will disappear , when re-enabling , the scrollbar reappears. Can provide an animated gif if necessary

notwaldorf commented 8 years ago

This is working as intended; otherwise scrolling will mess up the position of the dropdown. If you want to disable this, iron-dropdown has an attribute allowOutsideScroll that allows this. We should maybe also surface it to this element

lastmjs commented 8 years ago

This is happening to me as well. Why does it not occur in any of the demos?

lastmjs commented 8 years ago

Oh, @notwaldorf so it looks like adding the allowOutsideScroll attribute to paper-menu-button fixes the problem. Maybe this issue should be closed.

lastmjs commented 8 years ago

Wait, the demos have different behavior than I am experiencing still. The demos seem to keep the scrollbar but lock it in place. How can I achieve the same behavior? Having the scrollbar disappear is bad for my UX, because I have things shifting on the page when the scrollbar disappears, but then people can use the scrollbar, which messes up the position of the dropdown like @notwaldorf said. What to do?