-
Notifications
You must be signed in to change notification settings - Fork 9
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Option to Remove "Back to Tab" Button in Picture-in-Picture (PiP) Window #113
Comments
The "Back to tab" button is an implementation detail browsers choose to expose in their UI. I don't think the spec should say something about how browsers should handle this potential button.
Can you share a real-life example of this issue? It's not clear to me where user confusion may happen.
Safari and Firefox browsers also have respectively a "Return" and "Back to tab" button in their PiP video windows implementations. We didn't hear yet users complaining about it. Instead, we may want to update the Back to Tab" button UI in Chrome. Data points that proves that "Back to Tab" is confusing would also help as well.
The "Back to tab" button closes the PiP window but also focuses the opener tab. We could argue the "Back to Tab" button should be just about focusing the tab also.
A way to do feature detection before calling |
Since web developers can now use the |
I'm not sure I'm convinced that the Do you have any ideas on how to enable feature detection for the option? |
Do we have user stats about the usage of "close" vs "back to tab" buttons in PiP windows?
With no standardized ways to do proper feature detection before calling the let supportsAllowReturnToTab = false;
await documentPictureInPicture.requestWindow(
Object.defineProperty({ width: 300, height: 200 }, "allowReturnToTab", {
get: () => {
supportsAllowReturnToTab = true;
return true; // the actual value of "allowReturnToTab"
},
}),
);
console.log({ supportsAllowReturnToTab }); |
Yep. Just checked Windows stats and it looks like "back to tab" is used about twice as often as "close", so users definitely find it to be a useful feature. Also, thanks for the link about feature detection. Definitely seems like a larger issue |
I just want to support some of the comments that were already mentioned:
|
The current "Back to Tab" button within the Picture-in-Picture window presents some usability concerns that deserve consideration:
Contradicts Design Language: The "Back to Tab" closes the PiP window while navigating back to original tab, may conflict with the common web design pattern of "open in a new tab" button navigating towards a new page. This inconsistency can lead to user confusion, specifically when both buttons are visible (
Back to Tab
in the header andOpen in a New Tab
HTML button created by user).Unexpected Behavior: Users might not intuitively understand that the "Back to Tab" button closes the PiP window entirely. They might expect it to return focus to the original tab while keeping the PiP window open.
Alternative Controls: The standard "close" button (usually an "X") already provides the functionality of closing the PiP window, rendering the "Back to Tab" button potentially redundant.
Proposed Solution:
Provide an option to remove the "Back to Tab" button from the Picture-in-Picture
requestWindow
method.The text was updated successfully, but these errors were encountered: