Open Bug 1668815 Opened 4 years ago Updated 2 years ago

CSS hover state continues to apply when the mouse leaves the window quickly (When watching a video in "picture in picture", controls don't always disappear; interaction in the tabbar doesn't work)

Categories

(Core :: Widget: Gtk, defect, P3)

x86_64
Linux
defect

Tracking

()

REOPENED

People

(Reporter: julienw, Unassigned)

References

(Blocks 1 open bug)

Details

(Keywords: wayland)

Attachments

(1 file)

Attached video screencast

Hey,
I use the PIP feature often and this is so good.

But I realized that the controls don't disappear reliably on my system. I use Gnome Shell on Debian, and the focus management is in "focus follows mouse". This means that the focus goes to the window where the mouse is over, so the focus may change in a quick succession.

I'm using a fair recent nightly currently (v83 20200930092918).

Summary: When watching a video in "picture in picture", controls don't disappear when losing focus (possibly related to "focus follows mouse") → When watching a video in "picture in picture", controls don't disappear when losing focus
Summary: When watching a video in "picture in picture", controls don't disappear when losing focus → When watching a video in "picture in picture", controls don't always disappear when not hovering

I did some more checks (changing the focus behavior especially), and I realized that we don't use the focus to control the controls, instead we use the cursor hover status.

I noticed that this works as expected when moving the cursor out of the pip window slowly, but not when doing it quickly.

More information about my system: I use wayland, but Firefox with the X11 backend (I think, I see "xwayland" in about:support).

The controls disappear when the mouse cursor is still on the window, but close from the edges. So my guess is that we don't get an event to have this information when moving too quickly.

Another thing: when I'm in this state (controls are displayed but mouse is not hover the window), clicking on the related tab in Firefox doesn't do anything (especially doesn't put it in foreground), unless I click on another tab first.

https://searchfox.org/mozilla-central/rev/35245411b9e8a911fe3f5adb0632c3394f8b4ccb/toolkit/themes/shared/pictureinpicture/player.css#69,94,100

is what shows/hides the controls. They have opacity: 0 by default, and get opacity: 0.8 if the container is hovered. #controls takes up the entire window minus the space for dragging to resize the window (resize-margin, 5px on all sides). This seems like an issue in layout and/or our gtk widget layer.

(In reply to Julien Wajsberg [:julienw] from comment #3)

Another thing: when I'm in this state (controls are displayed but mouse is not hover the window), clicking on the related tab in Firefox doesn't do anything (especially doesn't put it in foreground), unless I click on another tab first.

What does "put it in foreground" mean? You mean make it the selected tab? Or you mean bring the entire window to the front, even if the tab is already the selected tab?

Component: Video/Audio Controls → Layout
Flags: needinfo?(felash)
Product: Toolkit → Core
Summary: When watching a video in "picture in picture", controls don't always disappear when not hovering → CSS hover state continues to apply when the mouse leaves the window quickly (When watching a video in "picture in picture", controls don't always disappear;
Summary: CSS hover state continues to apply when the mouse leaves the window quickly (When watching a video in "picture in picture", controls don't always disappear; → CSS hover state continues to apply when the mouse leaves the window quickly (When watching a video in "picture in picture", controls don't always disappear; interaction in the tabbar doesn't work)

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

https://searchfox.org/mozilla-central/rev/35245411b9e8a911fe3f5adb0632c3394f8b4ccb/toolkit/themes/shared/pictureinpicture/player.css#69,94,100

is what shows/hides the controls. They have opacity: 0 by default, and get opacity: 0.8 if the container is hovered. #controls takes up the entire window minus the space for dragging to resize the window (resize-margin, 5px on all sides). This seems like an issue in layout and/or our gtk widget layer.

Interesting. It looks like we don't get the information it's not hovered anymore, if we move too fast.

(In reply to Julien Wajsberg [:julienw] from comment #3)

Another thing: when I'm in this state (controls are displayed but mouse is not hover the window), clicking on the related tab in Firefox doesn't do anything (especially doesn't put it in foreground), unless I click on another tab first.

What does "put it in foreground" mean? You mean make it the selected tab? Or you mean bring the entire window to the front, even if the tab is already the selected tab?

yeah, I meant make it the selected tab.

Flags: needinfo?(felash)

(In reply to Julien Wajsberg [:julienw] from comment #5)

What does "put it in foreground" mean? You mean make it the selected tab? Or you mean bring the entire window to the front, even if the tab is already the selected tab?

yeah, I meant make it the selected tab.

Although I don't reproduce this specific problem anymore in today's nightly.

Component: Layout → Widget: Gtk

Julien, please reopen this bug if the problem occurs again in a recent Nightly.

Status: NEW → RESOLVED
Closed: 4 years ago
Resolution: --- → WORKSFORME

(In reply to Mats Palmgren (:mats) from comment #7)

Julien, please reopen this bug if the problem occurs again in a recent Nightly.

My reading of comment #6 was that the tab selection issue was fixed, but the other issue, around focus/hover state of the PiP video controls, persists. Julien, can you clarify?

Flags: needinfo?(felash)

Yes exactly, sorry for the confusion.

Comments 0 to 2 are still happening on my system.

Status: RESOLVED → REOPENED
Flags: needinfo?(felash)
Resolution: WORKSFORME → ---

So, I don't see this now anymore, but that may be because I switched back to X11 (I was using wayland when I filed the issue).
If nobody fixed it, then this may be a wayland-only issue.

Severity: -- → S4
Keywords: wayland
Priority: -- → P3
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: