Skip to content
This repository was archived by the owner on Dec 19, 2024. It is now read-only.

Check for scroll or auto anywhere in node style#293

Open
btelles wants to merge 1 commit intoPolymerElements:masterfrom
btelles:patch-1
Open

Check for scroll or auto anywhere in node style#293
btelles wants to merge 1 commit intoPolymerElements:masterfrom
btelles:patch-1

Conversation

@btelles
Copy link

@btelles btelles commented Mar 20, 2019

A valid computed style for overflow is "scroll auto". The existing implementation would consider this style a "non-scrollable" node. This change handles the edge case.

A valid computed style for overflow is "scroll auto". The existing implementation would consider this style a "non-scrollable" node. This change handles the edge case.
// Check inline style before checking computed style.
var style = node.style;
if (style.overflow !== 'scroll' && style.overflow !== 'auto') {
if (style.overflow.includes('scroll') && style.overflow.includes('auto')) {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There should be "!" om the conditions. It should not include scroll

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants