Open Bug 1769938 Opened 2 years ago Updated 1 year ago

Mousemove transition has issues with horizontal tracking (Was: Mousemove-driven backdrop-filter effect is worse in Firefox than Chrome)

Categories

(Core :: CSS Transitions and Animations, defect)

Firefox 102
x86_64
Linux
defect

Tracking

()

People

(Reporter: gregp, Unassigned)

References

()

Details

Attachments

(3 files)

Attached video comparison.webm

Steps to reproduce:

  1. Set layout.css.backdrop-filter.enabled to true in about:config
  2. Navigate to https://cdpn.io/techgirldiaries/fullpage/XWMrbvP
  3. Move cursor around

Actual results:
backdrop-filter effect has trouble following cursor.

Expected results:
backdrop-filter effect follows cursor without issue.

https://share.firefox.dev/3LnJ3uc

Attached video getting_stuck.webm

The cursor tracking issue happens independent of the visual effect. Even without the pref turned on, the effect window has odd snapping behavior in Firefox. This is likely a DOM event issue, not a graphics issue.

Can you post a URL for the codepen that shows the JavaScript that is being run in this demo?

Component: Graphics: WebRender → DOM: UI Events & Focus Handling
Flags: needinfo?(gp3033)

(In reply to Brad Werth [:bradwerth] from comment #2)

The cursor tracking issue happens independent of the visual effect. Even without the pref turned on, the effect window has odd snapping behavior in Firefox. This is likely a DOM event issue, not a graphics issue.

And interestingly, the vertical tracking is good, but the horizontal tracking is poor.

(In reply to Brad Werth [:bradwerth] from comment #2)

Can you post a URL for the codepen that shows the JavaScript that is being run in this demo?

document.addEventListener("mousemove", function (e) {
  const glass = document.querySelector(".glass");
  glass.style.left = e.offsetX + "px";
  glass.style.top = e.offsetY + "px";
});
Flags: needinfo?(gp3033)
Attached file reduced.html

It seems it is caused by css transition effect, if I remove transition: 0.2s; then black block moves smoothly.
And same as comment #3, the horizontal tracking is still poor even with transition: 0.001s;.

Component: DOM: UI Events & Focus Handling → CSS Transitions and Animations

I suspect this is not related to backdrop filter because I still see this issue without backdrop filter

Severity: -- → S3
Status: UNCONFIRMED → NEW
Ever confirmed: true

cc some people who might know more about mousemove.

I don't quite understand what the problem is. The following mouse cursor effect is implemented by setting left and top properties, and the element in question has transition: 0.2s, thus it will apply all transitionable-properties. Thus, the element movement is 0.2s delay basically. What's the problem?

(In reply to Hiroyuki Ikezoe (:hiro) from comment #9)

I don't quite understand what the problem is. The following mouse cursor effect is implemented by setting left and top properties, and the element in question has transition: 0.2s, thus it will apply all transitionable-properties. Thus, the element movement is 0.2s delay basically. What's the problem?

The horizontal tracking is different in quality than the vertical tracking. With attachment 9277372 [details] this is easy to see by making swift circles with the cursor. The rectangle will track vertically during these circular motions, but not horizontally.

Thanks Brad! Indeed I can see the horizontal tracking is jittering. That's odd. From the perspective of our CSS transition implementation, we don't differentiate top and left properties at all. If I change the transition property to transition: 0.01s step-end, it's more noticeable. There seems to be a bug.

See Also: → 1816561
Blocks: 1816630

This is a css transition bug and not a backdrop-filter bug.

No longer blocks: 1816630
Summary: Mousemove-driven backdrop-filter effect is worse in Firefox than Chrome → Mousemouse trasniton has issues with horizontal tracking (Was: Mousemove-driven backdrop-filter effect is worse in Firefox than Chrome)
Summary: Mousemouse trasniton has issues with horizontal tracking (Was: Mousemove-driven backdrop-filter effect is worse in Firefox than Chrome) → Mousemove transition has issues with horizontal tracking (Was: Mousemove-driven backdrop-filter effect is worse in Firefox than Chrome)
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: