Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Check ancestors overflow style instead of descendant's overflow style in IsVisible() #300

Open
DimiDL opened this issue Feb 25, 2022 · 0 comments

Comments

@DimiDL
Copy link
Collaborator

DimiDL commented Feb 25, 2022

Emilio mentioned that the following code is wrong while review this patch

if ((rect.width === 0 || rect.height === 0) && elementStyle.overflow === 'hidden') {
// Zero-sized ancestors don’t make descendants hidden unless the descendant
// has ``overflow: hidden``.
return false;
}

The overflow style of descendants doesn't affect whether they are visible in presence of a zero-sized ancestor. You want to check the overflow style of the ancestor itself if you want that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant