Closed Bug 1955583 Opened 7 months ago Closed 5 months ago

Right-click the PIP icon should show menu, but it launches PIP (while briefly showing a flash of the menu)

Categories

(Toolkit :: Picture-in-Picture, defect, P3)

defect

Tracking

()

VERIFIED FIXED
140 Branch
Tracking Status
firefox140 --- verified

People

(Reporter: pannett, Assigned: kpatenio)

Details

Attachments

(3 files)

Expected:
When playing a video, right clicking the picture-in-picture icon should show a context menu.

Actual:
Right clicking the PIP icon does the same as a left-click – it launches the picture-in-picture window.

The Bugbug bot thinks this bug should belong to the 'Toolkit::Picture-in-Picture' component, and is moving the bug to that component. Please correct in case you think the bot is wrong.

Component: Untriaged → Picture-in-Picture
Product: Firefox → Toolkit

Hi Paul,

Are you referring to the icon in the URL bar? Or the toggle on the video itself?

Flags: needinfo?(pannett)

The toggle in the video itself.

Flags: needinfo?(pannett)

Hi Paul,

If you open this test page, and right click on any of the white area of the page, does it add a "context menu opened" message?

Flags: needinfo?(pannett)

Yes, it does. Thanks Mike!

Flags: needinfo?(pannett)

The severity field is not set for this bug.
:mconley, could you have a look please?

For more information, please visit BugBot documentation.

Flags: needinfo?(mconley)

Hi Paul,

Does this happen for all videos? Would you mind sharing some videos links where you noticed the issue? And lastly, what OS are you using?

I'm wondering if this could be a problem with a site, or something else entirely.

Flags: needinfo?(pannett)

Thanks Katherine!

All videos on YouTube.com

Using Mac OS 14.6.1

I've sent you a video on Slack (it's too large to upload here)

Flags: needinfo?(pannett)
Flags: needinfo?(mconley)

Thanks Paul. In case it helps others, I'll document what we briefly discussed on Slack:

  • issue was spotted in Nightly 139.0a1
  • machine is a M3 MBP (November 2023), macos 14.6.1 like previously stated
  • no extensions were enabled
  • we verified the prefs in about:config. No immediate problems stood out to me. Even media.videocontrols.picture-in-picture.visibility-threshold was set to the default 1.0.

Despite having similar specs, I could not reproduce the issue from my end. If you don't mind checking again, Paul, do you still see the buggy behaviour on the latest Nightly?

Flags: needinfo?(pannett)

Yes, the issue still persists in the latest Nightly

Flags: needinfo?(pannett)

Gotcha, thanks for the speedy reply. I'll mark this as a p3/s3 for the time being.

Severity: -- → S3
Priority: -- → P3

I should add a detail that wasn't in the original ticket.

When I right click, the menu briefly shows before the PIP video pops out.

Shown in the GIF file that I shared a few minutes ago.

Severity: S3 → --
Priority: P3 → --
Summary: Right-click the PIP icon should show menu, but it launches PIP → Right-click the PIP icon should show menu, but it launches PIP (while briefly showing a flash of the menu)

I should add a detail that wasn't in the original ticket.

When I right click, the menu briefly shows before the PIP video pops out.

Shown in the GIF file that I shared a few minutes ago.

Hmm, yeah it's odd that the menu appears briefly before PiP opens. Seems to be interference between YouTube's event handling on the video element and the PiP toggle. Might be worth investigating too if the problem occurs on other video sites.

Ex. try right clicking the toggle with this video: https://vimeo.com/channels/smashingconf

Severity: -- → S3
Priority: -- → P3

Just tried Vimeo. Same issue as YouTube.

Ah, actually I forgot about control + click; with it, I'm able to reproduce the problem. It acts like right click, but is apparently recognized as a primary click (event.button = 0) and doesn't satisfy the condition at this line to stop PiP from triggering. We may want to check if event.button == 0, but ensure there are no other modifiers.

Sorry for the wild goose-chase!

I use a trackpad, so I use CTRL+click for what is commonly known as 'right click'

It didn't even cross my mind that I wasn't literally "right clicking" with a mouse.

(In reply to Paul from comment #18)

Sorry for the wild goose-chase!

I use a trackpad, so I use CTRL+click for what is commonly known as 'right click'

It didn't even cross my mind that I wasn't literally "right clicking" with a mouse.

No worries! I have a WIP patch up since I have cycles to spare.

Assignee: nobody → kpatenio
Status: NEW → ASSIGNED
Attachment #9489547 - Attachment description: WIP: Bug 1955583 - stop PiP from opening with macOS ctrl+click. r=#pip-reviewers! → Bug 1955583 - stop PiP from opening and instead show context menu on macOS ctrl+click. r=#pip-reviewers!
Pushed by kpatenio@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/e4362d5ac46a stop PiP from opening and instead show context menu on macOS ctrl+click. r=pip-reviewers,mconley
Status: ASSIGNED → RESOLVED
Closed: 5 months ago
Resolution: --- → FIXED
Target Milestone: --- → 140 Branch
QA Whiteboard: [qa-triage-done-c141/b140] [qa-verif-needed-c141/b140]
Flags: qe-verify+
QA Whiteboard: [qa-triage-done-c141/b140] [qa-verif-needed-c141/b140] → [qa-triage-done-c141/b140] [qa-ver-needed-c141/b140]

Reproduced the issue with Firefox 140.0a1 (2025-05-20) on macOS 12. Using Control + Click on the PiP video button will open PiP.
The issue is verified fixed with Firefox 140.0b2 on macOS 12. The context menu is correctly open when using Control + Click on the PiP video button.

Status: RESOLVED → VERIFIED
QA Whiteboard: [qa-triage-done-c141/b140] [qa-ver-needed-c141/b140] → [qa-triage-done-c141/b140] [qa-ver-done-c141/b140]
Flags: qe-verify+
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: