New issue
Advanced search Search tips

Issue 725749 link

Starred by 1 user

Issue metadata

Status: Assigned
Owner:
Components:
EstimatedDays: ----
NextAction: ----
OS: All
Pri: 2
Type: Bug



Sign in to add a comment

Extend semantics of Intersection Observer API to handle desktop window visibility

Project Member Reported by rhenders@google.com, May 24 2017

Issue description

UserAgent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/58.0.3029.110 Safari/537.36

Steps to reproduce the problem:
1. open an html document (window 0)
2. open a new window (window 1) and place it over window 0
3. verify that intersection observer still reports that content in window 0 is visible

What is the expected behavior?
Intersection observer should report content in an occluded window as not visible.

What went wrong?
On the desktop, Intersection Observer will report that an element is fully visible even though another window on the screen is preventing the user from seeing the element.  We propose that the calculations and event notifications of Intersection Observer include the layering and exposure of the window containing the web page.  This will improve the accuracy of viewability measurement.  It would also let web pages do things like pause animations when the presenting element is not visible.

Did this work before? N/A 

Does this work in other browsers? N/A

Chrome version: 58.0.3029.110  Channel: stable
OS Version: 
Flash Version:
 
Labels: Needs-Feedback Needs-Triage-M58
Can you provide us with a reproducible testcase for the ease of narrowing down the issue.

Comment 2 by jochen@chromium.org, May 25 2017

Components: -Blink>JavaScript Blink
Owner: ojan@chromium.org
Status: Assigned (was: Unconfirmed)

Comment 3 by ojan@chromium.org, May 27 2017

Cc: ojan@chromium.org
Components: -Blink Blink>Layout
Labels: -OS-Mac OS-All
Owner: szager@chromium.org
It's not possible for us to detect partial occlusion by other applications on most OSes. We can tell full occlusion on some OSes and we fire the visibilitychange event when fully occluded. We should probably have a discussion at https://github.com/WICG/IntersectionObserver/issues about whether IntersectionObserver should do when a document's visibilityState is hidden. I could see it argued either way.

There's a separate question of when a chrome window is partially or fully offscreen. That is something that we can detect (and so can a web author with screenX/screenY/etc). Whether IntersectionObserver should take screen clipping into account is also an interesting question that should probably be discussed at https://github.com/WICG/IntersectionObserver/issues.
Project Member

Comment 4 by sheriffbot@chromium.org, Jul 14 2017

Labels: Hotlist-Google

Comment 5 by ojan@chromium.org, May 8 2018

Cc: -ojan@chromium.org

Sign in to add a comment