fix(is-visible-on-screen): ignore elements hidden by overflow:hidden#3676
Merged
fix(is-visible-on-screen): ignore elements hidden by overflow:hidden#3676
Conversation
WilcoFiers
previously requested changes
Sep 28, 2022
Contributor
WilcoFiers
left a comment
There was a problem hiding this comment.
Mostly done, wrapping up for the day though.
| ancestors.push(vNode); | ||
| } | ||
|
|
||
| return ancestors.concat(getOverflowHiddenNodes(vNode.parent)); |
Contributor
There was a problem hiding this comment.
Double points for the clean recursion 😄.
WilcoFiers
previously requested changes
Sep 30, 2022
test/commons/math/rects-touch.js
Outdated
|
|
||
| let rectA, rectB; | ||
| beforeEach(() => { | ||
| rectA = { |
Contributor
There was a problem hiding this comment.
Not strictly necessary, but you could consider using DOMRect in these tests. (I only learned of these a week ago, otherwise I might've used them in target-size stuff.)
Contributor
Author
There was a problem hiding this comment.
Not a bad idea. If the tests were more complicated I might consider that, but since it's a simple test I'll just leave it as is.
WilcoFiers
approved these changes
Oct 8, 2022
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This also fixes a bug in
svg-non-empty-titlethat was discovered by this change in that it usedvisibleVirtualto get the title text.titleelements aren't visible so it should instead usesubtreeTextand allow hidden elements.For the previous
overflowHiddenfunction, I found that it was added to handle a screen reader only styling. I made sure the code still works with the new functionality.Closes issue: #3247 and #2806