Closed Bug 1666239 Opened 4 years ago Closed 3 years ago

The PiP player cannot be moved to a new position when it is dragged from the borders

Categories

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

Desktop
All
defect

Tracking

()

VERIFIED FIXED
Tracking Status
firefox80 --- affected
firefox81 --- affected
firefox82 --- affected

People

(Reporter: cmuresan, Unassigned)

References

(Blocks 1 open bug)

Details

(Whiteboard: [fidefe-MR1-2022])

Attachments

(2 files)

Attached image drag&drop_no_work.gif

[Affected versions]:

  • Firefox Nightly 82.0a1, Build ID 20200920213416
  • Firefox Beta 81.0, Build ID 20200917005511
  • Firefox Release 80.0.1, Build ID 20200831163820

[Affected Platforms]:

  • Windows 10
  • macOS 10.15
  • Linux MX 4.19

[Steps to reproduce]:

  1. Open Firefox Beta 81 with a clean new profile.
  2. Navigate to Youtube and play a video.
  3. Click the PiP button.
  4. Hover the left most border before the cursor changes from the "pointer" to the "move" one.
  5. Click and drag the video to another position.

[Expected results]:

  • The video player is moved to a new position.

[Actual results]:

  • The video remains in its initial place.

[Notes]:

  • The issue is reproducible with all borders (top, right, bottom, left, or corners).
  • The issue is reproducible regardless of where the video was dispatched from.
  • Attached a screen recording of the issue.

So this appears to be courtesy of the resize-margin CSS variable, where not the entire margin is actually getting the "resize" interaction, but those bits do "miss" the "move" interaction that the rest of the player window gets. The margin was introduced in bug 1548303, but I don't see where we made sure that those bits were actually all resizable. Mike, do you know what's supposed to do that?

Flags: needinfo?(mconley)

(In reply to :Gijs (he/him) from comment #1)

Mike, do you know what's supposed to do that?

I think it's platform specific. I believe this hardcoded value is what we use: https://searchfox.org/mozilla-central/rev/35245411b9e8a911fe3f5adb0632c3394f8b4ccb/widget/windows/nsWindow.cpp#360-364

I wonder if we're being overzealous here - the hardcoded value in nsWindow.cpp is 3px. resize-margin is 5px. Perhaps they should match?

Although, to be honest, 3px seems a tad small. I wonder if we should try to make it so that the region that we can resize the window from is larger - 5px, actually. Though I think this would likely either require Widget heroics, or some manual window-resizing stuff inside of player.js.

Flags: needinfo?(mconley)
Priority: -- → P3
Component: Video/Audio Controls → Picture-in-Picture
Whiteboard: [fidefe-MR1-2022]
Blocks: 1742457
No longer blocks: 1742457

Given that Bug 1598312 makes the pip window easier to resize from the edges by adjusting the resize margin, Molly do you think this is still an issue worth looking into?

Flags: needinfo?(mhowell)

You're right, this shouldn't be happening anymore after bug 1598312. Wouldn't hurt to try to reproduce though. ;)

Flags: needinfo?(mhowell)

Thanks Molly. I tried to reproduce this on Ubuntu (20.04 and 18.04), Windows 10, and MacOS Big Sur (all on the latest Nightly version 101). Ubuntu and Windows 10 seem to work well overall. With MacOS, the resize-margin seems relatively small, and resizing or repositioning of the pip window doesn't happen if the mouse cursor is at a very specific spot close to the edge.

See Also: → 1764094

I'm closing this bug since the new resize margin from Bug 1598312 removes the issue for Windows and Linux. The issue still remains for MacOS, but I suggest we redirect further discussion to Bug 1764094 instead.

Status: NEW → RESOLVED
Closed: 3 years ago
Resolution: --- → FIXED

I have verified that this issue is no longer reproducible using Firefox Release 115.0.1(BUILD ID: 20230706202047) and Firefox Nightly 117.0a1(BUILD ID: 20230705214733) on Windows 11x64. The video player is moved to a new position.
Considering this I'm marking this issue as Verified.

Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: