Page Visibility API doesn't fire event for Windows and Linux when alt+tab to a different window
Reported by
ma...@worldofcardgames.com,
Apr 25 2017
|
||||||||
Issue descriptionUserAgent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:52.0) Gecko/20100101 Firefox/52.0 Steps to reproduce the problem: 1. Open attached pagevis.html in a browser window 2. Open a new tab in Chrome 3. Switch bewtween pagevis.html and your empty tab - you will see a successful message being printed which shows the visibility changing from hidden to visible. 4. Open a completely new window such as Firefox or any other application, so that Chrome is obscured. 5. Switch the focus back to Chrome so that it is now maximized. 6. You will see no change - the Page Visibility API did not fire an event. What is the expected behavior? Page Visibility API is expected to fire an event when switching between windows, not just between tabs in the browser. What went wrong? No event was fired. Did this work before? N/A Does this work in other browsers? N/A Chrome version: 57.0.2987.133 (64-bit) Channel: stable OS Version: Ubuntu 14.04 Flash Version:
,
Apr 25 2017
Issue 293128 may have been related. It is fixed, but it appears to me that the fix did not address the problem that still occurs when the browser is obscured by another window
,
Apr 27 2017
,
May 12 2017
The root of the issue seems to be that Windows simply does not provide a straight way to know if a window is currently covered by another window or not. I found this workaround published on the MSDN forum, which might be of inspiration for a fix in Chromium: https://social.msdn.microsoft.com/Forums/vstudio/en-US/78289886-f3c1-405b-aaa1-722a23690245/how-to-check-if-a-window-is-partially-or-completely-obscured-by-other-windows?forum=netfxbcl
,
Jul 21 2017
Tested on Chrome Stable #59.0.3071.115 on Ubuntu 14.04, Mac 10.12.5 and Windows 10 and able to reproduce the issue. Issue is also reproduced on the latest Canary version #61.0.3163.0. This is a non-regression issue and able to reproduce from M-45 #45.0.2454.85. Marking it as untriaged so that issue gets addressed. Note - For Linux, verified on 47.0.2499.0. Thanks.
,
Aug 2 2017
Sami or Alexander - do we have a bug open tracking throttling tabs in occluded windows? That seems higher priority than this, and requires the same plumbing.
,
Aug 2 2017
PageVisibility is currently implemented using the visible / hidden signal from browser which doesn't consider occlusion. The occlusion signal would have to be plumbed through from the browser process (tab manager?) to renderer Instrumentation might look like this: https://chromium-review.googlesource.com/c/557910
,
Nov 15 2017
,
Nov 22 2017
I believe +fdoray@ has a prerequisite patch in the works for this (albeit not for Linux).
,
Nov 22 2017
,
Feb 15 2018
|
||||||||
►
Sign in to add a comment |
||||||||
Comment 1 by ma...@worldofcardgames.com
, Apr 25 2017