Closed Bug 1599376 Opened 5 years ago Closed 4 years ago

Picture-in-Picture window can not be opened using the keyboard shortcut on macOS

Categories

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

72 Branch
Desktop
macOS
defect

Tracking

()

RESOLVED FIXED
82 Branch
Tracking Status
firefox81 --- wontfix
firefox82 --- fixed

People

(Reporter: george.craciun, Assigned: jack1391, Mentored)

References

(Blocks 1 open bug)

Details

Attachments

(1 file, 1 obsolete file)

Build ID 20191124230652
User Agent Mozilla/5.0 (Macintosh; Intel Mac OS X 10.13; rv:72.0) Gecko/20100101 Firefox/72.0

Platforms:
macOS, Linux

Steps to reproduce:

  1. Launch Firefox
  2. Go to any video, such as youtube: https://www.youtube.com/watch?v=IoinmjCmM-E and start the video
  3. Enable the PiP window using the "Ctrl + Shift + ]" shortcut (Cmd instead of Ctrl on macOS)

Expected Result:
The PiP window should be accessible with keyboard only.

Actual Result:
The PiP can't be enabled using keyboard only.

Note:
On macOS the shortcut "Cmd + Shift + ]" is used for changing the tabs. ``

This seems like something we should address before release.

Blocks: 1532675
See Also: → 1599529

The Linux issue was separate (the keyboard shortcut was actually broken on Windows too!). Windows and Linux are being fixed in bug 1599529.

macOS is harder because it seems that Cmd-Shift-] is already taken as a keyboard shortcut - on macOS, this is used to advance the currently selected tab.

Do you have any suggestions on what to do here, Asa? Should we find a new, different keyboard shortcut for macOS? Or should we change the keyboard shortcut for everybody? Or something else altogether?

Flags: needinfo?(asa)
OS: Unspecified → macOS
Summary: Picture-in-Picture window can not be opened using the keyboard shortcut on macOS or Linux → Picture-in-Picture window can not be opened using the keyboard shortcut on macOS

Unfortunate. Keyboard shortcuts are hard. Because you can get at this from the context menu, I think we can ship without the dedicated shortcut on Mac but I'd like to find a solution quickly. I'm actually not sure what to do here. We've shipped this on Windows but perhaps no one has yet learned the shortcut and we can still change it? I think there are other places in the product where the shortcut is significantly different on Mac and Windows but those cases are exceedingly rare so I'd like to avoid that if possible. That leaves "new shortcut all around" as the best option I think. I'll start looking for a new shortcut that works cross-platform.

Priority: -- → P2
Priority: P2 → P3
No longer blocks: 1532675
No longer blocks: 1595504
See Also: → 1611154

This issue is reproducible on Nightly version 75.0a1 on macOS 10.14. Changed flags accordingly.

This issue is reproducible on Nightly version 76.0a1 on macOS 10.15. Changed flags changed accordingly.

This issue is reproducible on Nightly version 78.0a1 Build ID 20200511094328 on macOS 10.14. Changed flags accordingly.

What is this blocking on? Is it merely choice of a shortcut?

From this user's perspective, I would offer:

  • It's really frustrating to hear that lack of a keyboard shortcut for an important feature has been blocking for almost a year because of decision paralysis (if that's really true). It's one more reason to really hope and wish for configurable keyboard shortcuts for everything.
  • I'm not terribly picky about what the shortcut should be, I just want there to be one. I would be happy with a ridiculous interim platform-specifi shortcut that is hard to type (Cmd-Option-Shift-[ perhaps? Or Cmd-Ctrl-Shift-something; any of these 3-modifier shortcuts are generally discouraged so are also available…), although I understand why that's not a favored option.
  • I rarely use Cmd-Shift-] for Next Tab, I tend to use Ctrl-Tab for that. I suspect few people use both of those shortcuts. So I would be fine with losing either Cmd-Shift-] or Ctrl-Tab to give picture-in-picture a shortcut, if it came to that (but I don't think it has to).
  • The documentation page (https://support.mozilla.org/en-US/kb/about-picture-picture-firefox) appears to silently omit the keyboard shortcut for OSX, rather than admitting that there is a problem. It seems to me it should forthrightly admit there is no shortcut, rather than being silent. For instance, it is the top Google hit for "firefox picture-in-picture keyboard" (and "firefox picture-in-picture keyboard mac"!) except when viewed on a Mac there is nothing there. This adds to the sense of frustration.

Thanks!

What do you all think of the three modifier shortcut idea. Option + Command + Shift + right bracket, for example.

Flags: needinfo?(asa)

(Obviously I support my own idea, so yes. And yes, clearly Cmd+Opt+Shift-] is better than the left bracket equivalent, sorry that was a typo or cognitive dissonance or something.)

It occurs to me also that it would be great if these shortcuts were discoverable, and that could be easily be accomplished if the shortcut were printed next to the words "Picture-in-Picture" in the expanded version of the blue button that appears upon mouseover (right before you click it). I guess maybe this bug is not the right place to raise that, but perhaps someone can direct me appropriately.

Issue reproduced on MacOS 10.14.6 with latest Nightly 82.0a1 (20200902095359), Beta 81.0b5 (20200901203141) and Release 80.0.1 (20200831163820).

OK, so it seems we've agreed on a shortcut (comment #8).

To fix this, we'd need to add another <key> element together with this code: https://searchfox.org/mozilla-central/rev/5d45da52f2fa423c9f4505ede5d1a5c7d48163fc/browser/base/content/browser-sets.inc#237-239 that's behind an ifdef such that it only applies on macOS. It should specify the modifiers (cmd is reflected as "accel", opt as "alt") and use a data-l10n-id to provide the localized key - it should probably use a separate localization (l10n) identifier because although in English, we'd use "]" on every OS, different locales might be using different keys for the windows/linux shortcut that may not be available on macOS. To do that, we should add a new key/value pair in the localization file at https://searchfox.org/mozilla-central/rev/5d45da52f2fa423c9f4505ede5d1a5c7d48163fc/browser/locales/en-US/browser/browserSets.ftl#125-136 . We probably don't need another "alt" version because we're not using "shift" for this key, so just one localization should be sufficient.

Then, we would need to remove the skip-if annotation for the test for the keyboard shortcut: https://searchfox.org/mozilla-central/rev/5d45da52f2fa423c9f4505ede5d1a5c7d48163fc/toolkit/components/pictureinpicture/tests/browser.ini#34-35 , and make sure that the test works on macOS (for which you can use ./mach test path/to/test).

Assignee: nobody → jack1391
Mentor: mconley, gijskruitbosch+bugs
Attachment #9175371 - Attachment description: Bug 1599376 - My work r?mconley,Gijs → Bug 1599376 - Fixed toggle picture in picture shortcut on MacOS. r?mconley,gijs
Attachment #9175383 - Attachment is obsolete: true
Pushed by gijskruitbosch@gmail.com:
https://hg.mozilla.org/integration/autoland/rev/53fc2a01eecc
Fixed toggle picture in picture shortcut on MacOS. r=Gijs,fluent-reviewers
Status: NEW → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → 82 Branch

Hi,

I was able to reproduce this issue on Ubuntu 20.0.4.1 LTS on 82.0a1 (2020-09-14) (64-bit)
Is there a fix for Ubuntu or was this ticket only fixed for Mac OS?

Thanks,
Vir

(In reply to Virginia Balducci from comment #16)

I was able to reproduce this issue on Ubuntu 20.0.4.1 LTS on 82.0a1 (2020-09-14) (64-bit)
Is there a fix for Ubuntu or was this ticket only fixed for Mac OS?

This ticket was specifically for macOS. I don't really understand though, the shortcut should have worked on Linux both before and after this patch - maybe file a new bug if that is not the case for you, and we can dig into it there?

Flags: needinfo?(virginia.balducci)

Hi Gijs,

I just checked with a colleague, and we figured out that the shortcut works only when the "en-us" keyboard type is selected. My default keyboard is Spanish-Latam. We tested this on both Ubuntu 20 and Windows 10, and it was a question of keyboard input language.
I think that no matter which keyboard is selected, the shortcut should be expected to work, is this correct?

Flags: needinfo?(virginia.balducci) → needinfo?(gijskruitbosch+bugs)

(In reply to Virginia Balducci from comment #18)

Hi Gijs,

I just checked with a colleague, and we figured out that the shortcut works only when the "en-us" keyboard type is selected. My default keyboard is Spanish-Latam. We tested this on both Ubuntu 20 and Windows 10, and it was a question of keyboard input language.
I think that no matter which keyboard is selected, the shortcut should be expected to work, is this correct?

Sort of... I don't think it's possible to select a shortcut key that works across all possible keyboard layouts. Either way, it's worth filing a separate bug with more details. Still, that is unrelated to this (macOS-only) bug.

Flags: needinfo?(gijskruitbosch+bugs) → needinfo?(virginia.balducci)

Got it. I've opened https://bugzilla.mozilla.org/show_bug.cgi?id=1665128 to track that particular issue.

Thanks!

Flags: needinfo?(virginia.balducci)
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: