Closed Bug 1617135 Opened 2 years ago Closed 1 year ago

If PiP is in focus the keyboard combination CTRL+SHIFT+] doesn't work for closing the frame.


(Toolkit :: Video/Audio Controls, defect, P3)




83 Branch
Tracking Status
firefox83 --- verified


(Reporter: oana.botisan, Assigned: jack1391, Mentored)


(Blocks 1 open bug, Regressed 1 open bug)



(1 file)

Affected versions

  • Firefox 74.0b6
  • Firefox 75.0a1

Affected platforms

  • Ubuntu 18 x64
  • Windows 10 x64
  • macOS 10.11

Steps to reproduce

  1. Play a video from youtube.
  2. Use the combination CTRL+SHIFT+] from keyboard.
  3. Make sure that PiP is in focus and use the combination from step 2 again.

Expected result

  • PiP is closed.

Actual result

  • Nothing happens.

Regression range

  • If it's a regression, I will try to find it as soon as possible.

Additional Notes:

  • If the focus is on youtube, then the shortcut works to close the frame.
Has Regression Range: --- → no
Has STR: --- → yes
Priority: -- → P3

Regression range
This doesn't appear to be a regression. Checked with builds from 2019-09-06 that appears to be at the time the feature was implemented.

Has Regression Range: no → ---

Additional note: the shortcut "Ctrl+Shift+]" works if the video is focused instead of the Pip window.

To make this work, we should include xul:key elements in the player.xhtml document that are the same as the ones in the main browser window. We will also need a xul:command element that toggles picture in picture via its oncommand attribute, similar to the one in the main browser window.

The handler should probably just close the window - it doesn't really make sense to re-enter picture-in-picture from within the player window.

Assignee: nobody → jack1391
Mentor: gijskruitbosch+bugs, mconley

To elaborate slightly:

Once you've got the <key> and <command> in player.xhtml, I'd have the <command> oncommand attribute call something like Player.onCommand. Then I'd implement onCommand inside of the Player object in player.js.

The onCommand method should then close the window with something like:

PictureInPicture.closePipWindow({ reason: "player-shortcut" });

and that should do it!

Pushed by
Fix keyboard shortcut for closing picture in picture window when the player window is focused. r=mconley,Gijs
Closed: 1 year ago
Resolution: --- → FIXED
Target Milestone: --- → 83 Branch
Regressions: 1671352
Flags: qe-verify+

Reproduced the initial issue using an old Nightly build 75.0a1 on Windows 10.
Verified - Fixed in latest Nightly 84.0a1 84.0a1 (2020-10-22) and Beta 83.0b3 (build id: 20201022171613) using Windows 10 and Ubuntu 18.04.

Flags: qe-verify+
You need to log in before you can comment on or make changes to this bug.