isVisible() does not trim "visible" elements that are hidden with extreme xy coords
danielhertenstein opened this issue · 0 comments
danielhertenstein commented
If a sample (see mozilla-services/fathom-login-forms@f00fbcf5 for samples that were manually edited because of this) has an element that is hidden by using extreme xy coordinates (the linked examples has an element at x = -10000
) but is otherwise visible according to the logic in our isVisible()
function, that samples can slip through the vectorizer when it is considering only visible elements for a DOM selector or rule. We need to find a way to address these elements.
Elements that have negative xy coordinates could be filtered using element.x + element.width + element.ownerDocument.defaultView.scrollX < 0
, but this can also filter out elements that are not frozen as expected (see #231).