pip-blur-activation
Can a page open a Document Picture-in-Picture window when you switch to another app, using the transient activation left over from your last real input?
This browser has no documentPictureInPicture.
Use Chrome or Edge.
Live state
- userActivation.isActive
- –
- userActivation.hasBeenActive
- –
- document.hasFocus()
- –
- Last input
- –
- Measured activation lifetime
- –
- PiP window
- closed
Setup
Media session action
Chrome calls enterpictureinpicture without a
gesture, and opens that window without focus, while the page
captures the mic. Its docs only mention tab switches, so this
checks whether other ways of leaving trigger it too.
- Mic capture
- –
- Uncheck Armed above, so only the action can open the window, then press Start the mic and allow it.
-
Control: switch to another tab. The log
should say
enterpictureinpicture CALLED. If it doesn't, check that "Automatic picture-in-picture" is allowed in this site's settings (the icon left of the address). - Cmd+Tab to another app.
- Click another app's window.
- Cmd+M to minimise Chrome.
- Cover Chrome's window entirely with another app's window (maximise one over it), and wait a few seconds.
- Switch to another macOS desktop (Ctrl+→) or full-screen app.
- Whenever it opens, type straight away in the other app, to check the window didn't take focus.
Test protocol
-
Modifier keys. Wait until
isActiveis false, then press Cmd alone, then Shift alone, then Option alone. The log says whether each one turned activation on. -
Cmd+Tab after idling. Wait until
isActiveis false, then Cmd+Tab to another app. If PiP opens, the Cmd press alone was enough. - Cmd+Tab right after a click. Click the page, then within a second Cmd+Tab to another app.
- Clicking another app. Click the page, then within a second click another app's window.
-
After idling. Leave the page alone
until
isActiveis false, then click another app's window. - Focus. Whenever PiP opens, start typing straight away in the app you switched to (a text editor). Did your keys land there, or did the PiP window take them? The log also records whether the PiP window had focus.
- Tab switch, for comparison. Click the page, then Cmd+Opt+→ to another tab.