When an element goes fullscreen it can negatively affect the returned onscreen mesurement for the listeners, as the window.scrollY position seems to change. It is possible for an item to report that it isn't inview as it comes out of fullscreen (although this may be due to it actually being offscreen due to the scrollY change), as the following only ignores it being out of bounds if not fullscreen:
|
const isElementFullscreen = element === document.fullscreenElement; |
|
if (isOutOfBound && !isElementFullscreen) { |
|
onscreen = false; |
Does it also make sense to expand the current fullscreen check to account for the possibility of an observed element containing a descendant that is the document.fullscreenElement?
const hasFullscreenDescendant = element.contains(document.fullscreenElement);
When an element goes fullscreen it can negatively affect the returned onscreen mesurement for the listeners, as the window.scrollY position seems to change. It is possible for an item to report that it isn't inview as it comes out of fullscreen (although this may be due to it actually being offscreen due to the scrollY change), as the following only ignores it being out of bounds if not fullscreen:
adapt-contrib-core/libraries/inview.js
Lines 221 to 223 in 75e0ab9
Does it also make sense to expand the current fullscreen check to account for the possibility of an observed element containing a descendant that is the
document.fullscreenElement?