Created attachment 464907 [details] Demo: Touch compatibility mapping with mouse events trigger on wrong element WPE sends mouse motion/down/up in PageClientImpl::doneWithTouchEvent() for touches as compatibility mapping with mouse events [1]. Instead of reusing the target node (result of the hit test) from the touch events, completely new synthetic input events are created that rely solely on the X/Y coordinates of the touch event (see TouchGestureController::EventVariant()). Since all of this happens after the touch gesture is done, the new hit test triggered by the synthetic input events can be a different target node (i.e. if the DOM changes under the touch point as a result of the touchstart event). This again can lead to events on wrong elements. See attachment for a demo. This also affects the contextmenu handling in https://bugs.webkit.org/show_bug.cgi?id=248076 because it imitates the click handling. [1] https://www.w3.org/TR/pointerevents/#compatibility-mapping-with-mouse-events