Closed oliver92 closed 6 years ago
is this still an issue with the latest version? The scroll manager has moved to iron-overlay-behavior, and there were couple bugfixes there, so it might not be an issue anymore...
No the issue is still there.
Confirmed http://jsbin.com/bahawiv/1/edit?html,output, I'll move the issue in iron-overlay-behavior. @oliver92 feeling like sending a PR?
This issue was moved to PolymerElements/iron-overlay-behavior#273
Description
If i add an element with only overflowX = auto or overflowY = auto the _getScrollableNodes only checks for overflow = auto on the elements not the individual overflow ones.
Expected outcome
If i add an element with only overflowX = auto or overflowY = auto i expect the scrollLock to work for those elements as well.
Actual outcome
The scroll lock works, but the elements that needs to scroll does not.
Live Demo
Dont have one but i know exactly how to fix it: change the ifs of the _getScrollableNodes method to:
if ((style.overflow !== 'scroll' && style.overflow !== 'auto') && (style.overflowY !== 'scroll' && style.overflowY !== 'auto') && (style.overflowX !== 'scroll' && style.overflowX !== 'auto')) { style = window.getComputedStyle(node); } if (style.overflow === 'scroll' || style.overflow === 'auto' || (style.overflowY === 'scroll' || style.overflowY === 'auto') || (style.overflowX === 'scroll' || style.overflowX === 'auto')) { scrollables.push(node); }
Steps to reproduce
Browsers Affected