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

Stacking push lock #109

Closed MeinAccount closed 8 years ago

MeinAccount commented 8 years ago
  1. Visit the demo.
  2. Press on the label Letters of No underline (menu from bottom) twice.
  3. The scrolling is now permanently locked.

Clicking on the label twice causes two scroll locks to be pushed on Polymer.IronDropdownScrollManager. Closing the dropdown only removes one of these and the scrolling remains disabled.

wswoodruff commented 8 years ago

+1 on this!

wswoodruff commented 8 years ago

I put this chunk in the shell of the project and it's a fix for now!

this.addEventListener('paper-dropdown-open', function(e) {
    var dropdown = e.srcElement.querySelector("#dropdown");
    if(Polymer.IronDropdownScrollManager.currentLockingElement == dropdown) {
        Polymer.IronDropdownScrollManager.removeScrollLock(dropdown);
    }
});
cdata commented 8 years ago

Nice catch! This is totally a bug..

cdata commented 8 years ago

I'm going to close this as a dupe of https://github.com/PolymerElements/iron-dropdown/issues/47, since iron-dropdown is where this issue needs to be fixed.