[RUM-17322] 🐛 Do not record touch scroll gestures as click actions - #4892
Draft
Valpertui wants to merge 2 commits into
Draft
[RUM-17322] 🐛 Do not record touch scroll gestures as click actions#4892Valpertui wants to merge 2 commits into
Valpertui wants to merge 2 commits into
Conversation
On Android WebViews, when the native layer handles a scroll gesture the page receives pointerdown -> pointerup (no `pointercancel`, and the browser suppresses its own synthetic `click`) even though the finger moved. The action tracker equated any pointerdown -> pointerup pair with a click, so these scrolls were recorded as (mostly dead) click actions, polluting analytics funnels. Add a movement guard in `listenActionEvents`: a touch/pen pointer that travels more than ACTION_SCROLL_DISTANCE_THRESHOLD (10px) between pointerdown and pointerup is treated as a scroll/drag and not recorded as a click. Mouse is unchanged. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
|
Cover the cases raised in review: touch jitter below the browser's click slop is kept, exactly-at-threshold kept, just-past discarded, euclidean/diagonal distance, pen drag discarded / pen tap kept, mouse never discarded at any distance, and pointercancel (no pointerup) produces no action. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Bundles Sizes Evolution
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
On Android WebViews, when the native layer handles a scroll gesture the page receives pointerdown -> pointerup (no
pointercancel, and the browser suppresses its own syntheticclick) even though the finger moved. The action tracker equated any pointerdown -> pointerup pair with a click, so these scrolls were recorded as (mostly dead) click actions, polluting analytics funnels.Add a movement guard in
listenActionEvents: a touch/pen pointer that travels more than ACTION_SCROLL_DISTANCE_THRESHOLD (10px) between pointerdown and pointerup is treated as a scroll/drag and not recorded as a click. Mouse is unchanged.Motivation
Changes
Test instructions
Checklist