[Webkit-unassigned] [Bug 207256] New: visibilitychange event does not get always fired on background but it may on foreground
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Wed Feb 5 04:20:05 PST 2020
https://bugs.webkit.org/show_bug.cgi?id=207256
Bug ID: 207256
Summary: visibilitychange event does not get always fired on
background but it may on foreground
Product: WebKit
Version: Safari 12
Hardware: iPhone / iPad
OS: iOS 12
Status: NEW
Severity: Normal
Priority: P2
Component: WebCore JavaScript
Assignee: webkit-unassigned at lists.webkit.org
Reporter: cerutti.alexander at gmail.com
Hello,
this is my first bug here and I'm not too sure about the information I filled to report this problem, since I'm not that into Webkit.
What I experienced is that I've tried to attach a `visibilitychange` listener on my application. It contains a `console.log` and some logics that depend on `document.hidden`.
So, if home button or sleep button is pressed, the event is fired and we can see in the debugging console the log.
I've been reported, and I've verified, that sometimes this event is not fired when, for sure on iPad (also iOS 13), one of those two buttons are pressed. Instead the event is fired when Safari goes back in foreground. So the log gets printed twice. Moreover, sometimes `document.hidden` is `false` in both events. So if some logic is based on a check on that property, wrong code block may be run.
I wasn't able to find a steady way to reproduce this, and this seems to happen in different cases.
For example, I'm developing a video player (here is where the event is created). We are importing a third-party video AD engine. What we experienced is that during some ADs, on home/sleep buttons, the event is not fired on background but twice on foreground. This happened also during other video contents playback, but I'm not sure it is related to multimedia contents playback but instead on the amount of work the engine that is has to do when the buttons get pressed or some kind of concurrency problem on Safari background (but these are only thoughts of mine).
If I'll ever find more details I'll edit or add a comment to increase the details.
I hope this bug report is good enough (but I think this won't be) to find the problem.
Thank you.
--
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20200205/97feaf88/attachment.htm>
More information about the webkit-unassigned
mailing list