I've noticed that windows.onFocusChanged can sometimes fire "in the background" without user action. After leaving my laptop alone for awhile I'll find window focus events have appeared in the logs. I've seen this happen in response to what looks like a push event from a server, related to the lastpass addon. (Maybe it opens some kind of 'window' in the background?) I assumed it would only fire in response to a user navigating to a new url, but that doesn't seem to be the case? Is this expected behavior? I'm working on porting "Mind the Time" to WebExtensions and have uploaded some beta releases. The most recent has console logging to see when events like this fire. This is on FF 55.0 dev edition, multi-process, on Ubuntu 16.04, with my own profile with many open tabs, other add-ons, and several windows open.  https://developer.mozilla.org/en-US/Add-ons/WebExtensions/API/windows/onFocusChanged  https://addons.mozilla.org/en-US/firefox/addon/mind-the-time/
There's no guarantee that any API events have any correlation to user actions, except the ones that explicitly say that they do. onFocusChanged fires whenever the focus changes, regardless of why it happened.
Status: NEW → RESOLVED
Last Resolved: 2 years ago
Resolution: --- → INVALID
You need to log in before you can comment on or make changes to this bug.