Closed Bug 1544966 Opened 4 years ago Closed 4 years ago

pointer events are cancelled even with touch-action: none on a scrollable page


(Core :: Panning and Zooming, defect, P3)

Windows 10



Tracking Status
firefox68 --- fixed


(Reporter: timdream, Assigned: kats)



(4 files)


  1. On a touchscreen Windows device, like a Surface.
  2. Go to
  3. Make the page scrollable by doing | = "120vh"|.
  4. Try to trigger pinch/zoom in the box.


  1. It should work exactly as advertised.


  1. Sometimes the pointer events will get cancelled for no reasons and the app will not be able to recognize the gesture.


  1. This won't happen, or happen less, when the page is not scrollable.
  2. I don't know if this happens on Firefox for Android or not but the page seems work fine if I turn on the responsive design mode. Although the page isn't exactly pannable on RDM.
  3. The demo is found on
Attached file page to test

The page on MDN with |height: 120vh| added.

Attachment #9058813 - Attachment mime type: text/plain → text/html

I can reproduce on Windows and Android (if dom.w3c_pointer_events.enabled=true). Basically if I go right into a pinch (both fingers down, then start moving) it doesn't work as expected. If I put one finger down, move it, then put the second finger down and move it, it does work. This seems to imply that APZ is detecting the first gesture as a pinch zoom and triggering pointercancel events when it's not supposed to (because the page has touch-action:none).

Priority: -- → P3

Initial investigation indicates that the APZ doesn't have the touch behaviours at the time of the pinch, so it defaults to allowing the pan-y action here.

This is kind of a silly thing: the layer tree and HitTestTreeNode instances have the right touch behaviours, but they only get sent to the InputQueue here which is a few lines after the ReceiveInputEvent that runs the ArePointerEventsConsumable function. So from an APZ behaviour point of view, the touch action flags are set on the input block in time, but the nsEventStatus return value is not as correct as it could be, which impacts pointer events.

A little plumbing should take care of this.

Assignee: nobody → kats

I have a fix, just need to write a test..

Pushed by
Put the touch behavior flags on the TouchBlockState earlier. r=botond
Don't schedule a main-thread wait if the APZCTM provided the touch behaviours already. r=botond
Add a mochitest. r=botond
You need to log in before you can comment on or make changes to this bug.