Open Bug 1628987 Opened 4 years ago Updated 7 months ago

scroll disabled on touchmove with transform

Categories

(Core :: Web Painting, defect, P2)

76 Branch
defect

Tracking

()

REOPENED

People

(Reporter: thomas.welter, Unassigned)

References

(Blocks 1 open bug)

Details

Attachments

(4 files)

Attached file tes.html

User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/80.0.3987.163 Safari/537.36

Steps to reproduce:

  1. Launch the html file
  2. swipe down and then release (causing the div to animate back into position)
  3. scrolling is now disabled

Actual results:

Scrolling is not working in the following sitations:

  1. scrolling with two fingers on the trackpad
  2. scrolling using the touchscreen on my laptop

Scrolling can be made working again by:

  1. clicking the scrollbar
  2. switching tabs

This seems influenced by the translateY transform on line 103. When i translate by any amount other then 0 this issue appears.

Expected results:

I expect passive event listeners to not affect scrolling behavior. The current behavior of disabling scrolling until switching tabs seems especially strange.

Note: Just switching tabs doesn't seem to be enough. Switching windows seems to work and switching tabs and then scrolling in another tab also seems to work

Bugbug thinks this bug should belong to this component, but please revert this change in case of error.

Component: Untriaged → Layout: Scrolling and Overflow
Product: Firefox → Core

This seems related probably to how APZ handles focus...

I can repro with a touch screen on desktop linux (using WebRender, FWIW).

Status: UNCONFIRMED → NEW
Component: Layout: Scrolling and Overflow → Panning and Zooming
Ever confirmed: true

Seems to repro as well on Firefox 70 with WR disabled.

I don't have a touchscreen laptop on hand to test but I can reproduce in Fennec (landscape orientation to make the page scrollable). Not in Fenix though. Strange. For touch-driven scrolling attempts I might guess that resetting the div's transform during the touchmove causes the APZ scroll to get interrupted by rebuilding the layer tree or something, but that wouldn't explain why scrolling "with two fingers on the trackpad" would break, because that shouldn't be triggering any of the listeners on the page.

This will need some investigation on a machine with a touchscreen. I'll try digging out a Windows touchscreen laptop that I have and see if I can repro there and/or get logs.

I can repro on a Windows touchscreen laptop now. I turned on various APZ logging and the results are puzzling but inconclusive. Seems like we immediately go from state TOUCHING into state NOTHING once we have a pan that exceeds the movement threshold. The NOTHING state consumes all the touchmove events without doing any panning. I'm not sure why we go into the NOTHING state, I presume it's happening inside this call but I'll add more logging to figure out exactly what's happening.

Seems like the layer tree changes such that there's a HTTN for the root content sitting on top of everything else and getting the touch events. The root content isn't scrollable so nothing scrolls. Need to dig into the display list/layers tree to see why that HTTN is coming out where it is.

Seems like there's a stray CompositorHitTestInfo item at the end of the display list (after the nsDisplayTransform and all its underlings) that ends up creating a new [not visible] layer but that has hit-test info. That's the layer that that ends up on top of everything and consuming the input.

I don't know what frame is generating that display item yet since the frame doesn't match anything else in the DL dump. Will need to get a frame dump too.

Resetting severity to default of --.

Here's output including a frame dump. The CompositorHitTestInfo display item seems to be coming from the block frame for the body element, which seems wrong, since any hit-test items from the body should go under the transformed scrollframe, not on top.

Component: Panning and Zooming → Web Painting
Blocks: APZLayout

The priority flag is not set for this bug.
:mattwoodrow, could you have a look please?

For more information, please visit auto_nag documentation.

Flags: needinfo?(matt.woodrow)
Flags: needinfo?(matt.woodrow)

Because this bug's Severity has not been changed from the default since it was filed, and it's Priority is -- (Backlog,) indicating it has has not been previously triaged, the bug's Severity is being updated to -- (default, untriaged.)

Severity: normal → --
Severity: -- → S2
Flags: needinfo?(matt.woodrow)
Priority: -- → P2

S1 or S2 bugs needs an assignee - could you find someone for this bug?

Flags: needinfo?(matt.woodrow)
Flags: needinfo?(matt.woodrow) → needinfo?(botond)

I was hoping to hand this off to you (Matt) or Miko or somebody else who has a better handle on DL building code...

Marking this as S3 as it appears that S2 (Serious) Major functionality/product severely impaired - is not the correct severity here. Please update if this is incorrectly categorized.

Severity: S2 → S3

Thomas, can you still reproduce this in a recent Firefox version?

Flags: needinfo?(botond) → needinfo?(thomas.welter)

Redirect a needinfo that is pending on an inactive user to the triage owner.
:tnikkel, since the bug has recent activity, could you have a look please?

For more information, please visit BugBot documentation.

Flags: needinfo?(thomas.welter) → needinfo?(tnikkel)
Status: NEW → RESOLVED
Closed: 7 months ago
Flags: needinfo?(tnikkel)
Resolution: --- → INCOMPLETE

?? Don't see any reason why this should be closed.

Status: RESOLVED → REOPENED
Resolution: INCOMPLETE → ---

I assumed it was no longer reproducible.

I don't see that in the bug history.

Yeah, my bad, I didn't read the whole history, I only read starting from recent comments (comment 19).

I don't want to be a pedant here, but I think this point is important: I don't see evidence of lack of reproducibility when starting from comment 19.

OK, is there something else I can do to rectify my wrong assumption other than offering my apology?

I was clarifying things, not trying to flog you.

You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: