More specifically, what's happening is: * The page has a root scroll frame R, and also a subframe S. Each has its own gesture detector. * We get a touch-start E1 with one touch point, and it starts an input block A. The target for A is S. We forward E1 to content to see if it will prevent-default it. * We get a touch-start E2 with two touch points, and it starts an input block B. The target for B is R (since multi-touch events are always routed to the root scroll frame). We forward E2 to content to see if it will prevent-default it. * Content does not prevent-default E1 (it only wants to provide custom behaviour for two-finger gestures). E1 is sent to S. S's gesture detector starts a long-tap timeout task. * Content does prevent-default E2. E2 is not sent to R. Instead, a touch-cancel is sent to R. The touch-cancel clears R's gesture detector's state, but leaves S's gesture detector's state alone. * Meanwhile, we're receiving two-finger touch-move events. They all have R as their target, they're all prevent-defaulted by content, they all cause additional touch-cancels to be sent to R. Nothing further is sent to S or its gesture detector, though. * Eventually, S's gesture detector reaches its long-tap timeout, and fires the long-tap at S, triggering a context menu event.
Bug 1570559 Comment 3 Edit History
Note: The actual edited comment in the bug view page will always show the original commenter’s name and original timestamp.
More specifically, what's happening is: * The page has a root scroll frame R, and also a subframe S. Each has its own gesture detector. * We get a touch-start E1 with one touch point, and it starts an input block A. The target for A is S. We forward E1 to content to see if it will prevent-default it. * We get a touch-start E2 with two touch points, and it starts an input block B. The target for B is R (since multi-touch events are always routed to the root scroll frame). We forward E2 to content to see if it will prevent-default it. * Content does not prevent-default E1 (it only wants to provide custom behaviour for two-finger gestures). E1 is sent to S. S's gesture detector starts a long-tap timeout task. * Content does prevent-default E2. E2 is not sent to R. Instead, a touch-cancel is sent to R. The touch-cancel clears R's gesture detector's state, but leaves S's gesture detector's state alone. * Meanwhile, we're receiving two-finger touch-move events. They all have R as their target, they're all prevent-defaulted by content, and they all cause additional touch-cancels to be sent to R. Nothing further is sent to S or its gesture detector, though. * Eventually, S's gesture detector reaches its long-tap timeout, and fires the long-tap at S, triggering a context menu event.