If a PiP window is open from a Split View, switching to another tab will close the PiP window
Categories
(Firefox :: Tabbed Browser, defect, P2)
Tracking
()
People
(Reporter: atrif, Assigned: kcochrane)
References
(Blocks 1 open bug)
Details
(Whiteboard: [fidefe-splitview])
Attachments
(3 files)
Found in
- 146.0a1 (2025-11-02)
Affected versions
- 146.0a1 (2025-11-02)
Tested platforms
- Affected platforms: Ubuntu 24, Windows 11, macOS 26
- Unaffected platforms: none
Preconditions
- split view enabled
Steps to reproduce
- Create a split view with a video and open PiP.
- Switch to another tab.
Expected result
- PiP window remains visible.
Actual result
- PiP window is closed.
Regression range
- New feature. Happens after bug 1986946 implementation.
Additional notes
- Attached a screen recording.
Updated•1 month ago
|
Comment 1•1 month ago
|
||
Hi, just adding two additional notes:
- This seems to only been occuring with PiP on youtube
- Once you resize split-view it does not occur (in the same split-view)
Updated•1 month ago
|
Comment 2•10 days ago
|
||
This is pretty strange - it looks like PiP is closing because YouTube is removing the video element from the page when the tab is backgrounded. Once the splitview is resized even just a little bit though (1-2px seems to be enough), YouTube stops doing this.
Updated•9 days ago
|
| Assignee | ||
Updated•4 days ago
|
| Assignee | ||
Comment 3•4 days ago
|
||
Gonna link bug 1956165 as potentially related. It looks like Youtube doesn't allow PiP on mobile screens. Their logic for determining if it's mobile seems to be based on window width / ratios (if it's less than 2/3rds of the screen or some such). :niklas confirmed he can't reproduce this issue on an ultrawide monitor which further supports this being related to split view panels being more narrow on smaller screens/monitors.
What I still have yet to understand is:
- Why we're able to use PiP when the split view tab is still active
- Why does resizing the split view panels prevent this issue?
NIing :emilio in case he also has some ideas on this when he's back from holiday tomorrow.
The split view tab is clearly being drawn at full window width in the background if it has not been resized yet with the splitter, switching to/away from it causes a resize event and subsequent loss of PiP window (Bug 1667458).
Comment 6•3 days ago
|
||
Yeah it seems the issue is that the resize happens only while the tab is in the foreground. This doesn't seem to be split view specific right? As in, I can repro the PIP window going away for:
- Maximized window
- Open youtube in a regular tab.
- Use PIP.
- Go somewhere else.
- Shrink the window.
The code that Youtube used to have at least (probably still does) is:
g.Y.Ox = function () {
if (this.Pw()) {
var k = this.Zm();
k !== 0 &&
k !== 1 ||
this.t5(CQ(this) ? 1 : 0);
k = window.screen.width * window.screen.height;
var n = window.outerHeight * window.outerWidth;
this.W.nW ? (
this.CL = Math.max(this.CL, k, n),
k = n / this.CL < this.W.P6,
this.visibility.wD(k),
this.W.Di &&
FZ7(this, k)
) : this.mediaElement &&
KQ(this, n / k < 0.33) &&
this.mediaElement.Lm()
}
Where this.W was 0.3. But assuming outerHeight / outerWidth are returning the full window size (which it should) it shouldn't be to blame.
| Assignee | ||
Comment 7•3 days ago
|
||
| Assignee | ||
Updated•1 day ago
|
Comment 11•18 hours ago
|
||
Comment 12•11 hours ago
|
||
| bugherder | ||
Comment 13•11 hours ago
|
||
Since nightly and release are affected, beta will likely be affected too.
For more information, please visit BugBot documentation.
Description
•