Intent to Ship: Document picture-in-picture: allow Window's focus() API to focus opener

335 views
Skip to first unread message

Tommy Steimel

unread,
Feb 12, 2024, 4:31:12 PMFeb 12
to blink-dev

Contact emails

ste...@chromium.orglibe...@chromium.org

Explainer

None

Specification

https://github.com/WICG/document-picture-in-picture/pull/109

Summary

This enables `opener.focus()` from a document picture-in-picture window to bring system-level focus to the tab that owns the document picture-in-picture window. This allows developers to bring the original tab back to the foreground when necessary, e.g. when the user needs to access a more full UI/experience that doesn't fit in the smaller picture-in-picture window.



Blink component

Blink>Media>PictureInPicture

TAG review

N/A as this is a minor change to the behavior of an existing API

TAG review status

Not applicable

Risks



Interoperability and Compatibility

None



Gecko: No signal (https://github.com/mozilla/standards-positions/issues/670#issuecomment-1919880414) Added comment to existing standards position issue for document picture-in-picture. No response yet

WebKit: No signal (https://github.com/WebKit/standards-positions/issues/41#issuecomment-1919879502) Added comment to existing standards position issue for document picture-in-picture. No response yet

Web developers: Positive (https://github.com/WICG/document-picture-in-picture/issues/94) We have received feature requests for programmatically returning to the opener tab from multiple first and third-party partners

Other signals:

Ergonomics

N/A



Activation

N/A



Security

While allowing the picture-in-picture window to bring system-level focus to the opener tab at will could be abused, the user gesture requirement effectively ensures that the user is at least currently interacting with that website and not another, so is less likely to be surprised or tricked by the change of focus to another window from the same origin.



WebView application risks

Does this intent deprecate or change behavior of existing APIs, such that it has potentially high risk for Android WebView-based applications?

N/A



Debuggability

N/A



Will this feature be supported on all six Blink platforms (Windows, Mac, Linux, ChromeOS, Android, and Android WebView)?

No

The document picture-in-picture API is not supported on Android



Is this feature fully tested by web-platform-tests?

Yes

document-picture-in-picture/focus-opener.https.html



Flag name on chrome://flags

None

Finch feature name

None

Non-finch justification

Small change to existing API



Requires code in //chrome?

False

Sample links


https://steimelchrome.github.io/backtotab.html

Estimated milestones

Shipping on desktop123


Anticipated spec changes

Open questions about a feature may be a source of future web compat or interop issues. Please list open issues (e.g. links to known github issues in the project for the feature specification) whose resolution may introduce web compat/interop risk (e.g., changing to naming or structure of the API in a non-backward-compatible way).

None expected

Link to entry on the Chrome Platform Status

https://chromestatus.com/feature/6313015987404800

This intent message was generated by Chrome Platform Status.

Asif jutt Jutt

unread,
Feb 13, 2024, 5:24:55 AMFeb 13
to Tommy Steimel, blink-dev
Support on update 
Service delivery Manager

--
You received this message because you are subscribed to the Google Groups "blink-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to blink-dev+...@chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/blink-dev/CAE-AwApDdgkBjOAQ0bXU-Y7wFe0qp6jOr%2Bv929%3DzJ-RL_x%3D%2BPA%40mail.gmail.com.

Yoav Weiss (@Shopify)

unread,
Feb 14, 2024, 9:24:39 AMFeb 14
to blink-dev, Tommy Steimel


On Monday, February 12, 2024 at 10:31:12 PM UTC+1 Tommy Steimel wrote:

What's preventing the PR from landing?
 


Summary

This enables `opener.focus()` from a document picture-in-picture window to bring system-level focus to the tab that owns the document picture-in-picture window. This allows developers to bring the original tab back to the foreground when necessary, e.g. when the user needs to access a more full UI/experience that doesn't fit in the smaller picture-in-picture window.



Blink componentBlink>Media>PictureInPicture

TAG reviewN/A as this is a minor change to the behavior of an existing API

Can you add a comment to notify the TAG of this change?
 


TAG review statusNot applicable
Link to entry on the Chrome Platform Statushttps://chromestatus.com/feature/6313015987404800

Tommy Steimel

unread,
Feb 14, 2024, 2:07:20 PMFeb 14
to Yoav Weiss (@Shopify), blink-dev
Landed the PR and added a comment to the TAG thread. Thanks!

Chris Harrelson

unread,
Feb 14, 2024, 3:28:31 PMFeb 14
to Tommy Steimel, Yoav Weiss (@Shopify), blink-dev
Thanks!

LGTM1

--
You received this message because you are subscribed to the Google Groups "blink-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to blink-dev+...@chromium.org.

Yoav Weiss (@Shopify)

unread,
Feb 15, 2024, 1:06:48 AMFeb 15
to Chris Harrelson, Tommy Steimel, blink-dev
LGTM2

Mike Taylor

unread,
Feb 15, 2024, 10:53:27 AMFeb 15
to Yoav Weiss (@Shopify), Chris Harrelson, Tommy Steimel, blink-dev
Reply all
Reply to author
Forward
0 new messages