Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(rrweb): clean up pointer tap circles when seeking by breadcrumb #209

Merged
merged 6 commits into from
Jun 24, 2024

Conversation

michellewzhang
Copy link
Member

@michellewzhang michellewzhang commented Jun 20, 2024

before:

Screen.Recording.2024-06-20.at.11.39.04.AM.mov

after (video also shows playback working normally):

Screen.Recording.2024-06-20.at.11.41.07.AM.mov

@michellewzhang michellewzhang requested a review from billyvg June 20, 2024 18:41
// prevents multiple touch circles from staying on the screen
// when the user seeks by breadcrumbs
Object.values(this.pointers).forEach((p) => {
if (p !== pointer && !p.touchActive) {
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the !p.touchActive ensures that this works for multitouch when seeking - all taps should show up

// when the user seeks by breadcrumbs
Object.values(this.pointers).forEach((p) => {
if (p !== pointer && !p.touchActive) {
p.touchActive = false;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm since the condition is !p.touchActive, wouldn't this mean touchActive is already false?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if p.touchActive === true (this can be true for various pointers at the same time in the case of multitouch) then we don't want to set touchActive = false. otherwise we'd remove the pointer erroneously for multitouch. but touchActive can also be null for the pointers that aren't active, so those are the cases we want to set touchAcitve = false

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we clarify this in a code comment? (and also what it means for it to be null vs false)

@michellewzhang michellewzhang merged commit dbc62a2 into sentry-v2 Jun 24, 2024
14 checks passed
@michellewzhang michellewzhang deleted the mz/clean-pointers branch June 24, 2024 18:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Mobile replay tap events - shows multiple at the same time
3 participants