Skip to content

Avoid stealing focus when switching tab #146

@arnesten

Description

@arnesten

Hi,

I'm using the documentPictureInPicture feature to show a small stopwatch timer when switching to a different tab. However, the new PiP window always steals the focus when switching tab.

For example if I press CTRL+T to add a new tab in the browser, I expect to be able to type directly in the browser address field. But the PiP window takes over the focus. Would be great if that didn't happen, or at least was configurable like window.documentPictureInPicture.requestWindow({ focus: false }) or similar.

If using navigator.mediaSession.setActionHandler('enterpictureinpicture', handler) it doesn't appear to steal focus when the PiP is opened, but in my use case I'm not playing a video/audio.

Thoughts?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions