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?

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
–
  1. Uncheck Armed above, so only the action can open the window, then press Start the mic and allow it.
  2. 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).
  3. Cmd+Tab to another app.
  4. Click another app's window.
  5. Cmd+M to minimise Chrome.
  6. Cover Chrome's window entirely with another app's window (maximise one over it), and wait a few seconds.
  7. Switch to another macOS desktop (Ctrl+→) or full-screen app.
  8. Whenever it opens, type straight away in the other app, to check the window didn't take focus.

Test protocol

  1. Modifier keys. Wait until isActive is false, then press Cmd alone, then Shift alone, then Option alone. The log says whether each one turned activation on.
  2. Cmd+Tab after idling. Wait until isActive is false, then Cmd+Tab to another app. If PiP opens, the Cmd press alone was enough.
  3. Cmd+Tab right after a click. Click the page, then within a second Cmd+Tab to another app.
  4. Clicking another app. Click the page, then within a second click another app's window.
  5. After idling. Leave the page alone until isActive is false, then click another app's window.
  6. 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.
  7. Tab switch, for comparison. Click the page, then Cmd+Opt+→ to another tab.

Log