You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
While I can understand that determining if an element is actually "displayed" or "visible" in a document can be tricky, the current implementation seems overly naive, failing to identify an element hidden through ancestry:
Yes that does make sense. I'd be a breaking change though; it can be included in the next major version (I'd like to make chai-dom an ES Module, see #38)
...which looks convincing enough about element's visibility.
Elements are considered visible if they consume space in the document. Visible elements have a width or height that is greater than zero. https://api.jquery.com/visible-selector/
While I can understand that determining if an element is actually "displayed" or "visible" in a document can be tricky, the current implementation seems overly naive, failing to identify an element hidden through ancestry:
IMO, both visible and displayed should return false if any ancestor element is styled with
display: none
.The text was updated successfully, but these errors were encountered: