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: replayClick script #57

Merged
merged 1 commit into from
Sep 6, 2024
Merged

Conversation

sauravbv
Copy link
Contributor

@sauravbv sauravbv commented Sep 6, 2024

Description

In the replayClick script there is a simple logic mistake where click is being triggered on non Click events, rather than the Click events.
ReplayClick should trigger on click events and not the other events like scroll, mousemove etc

Linked Issues

I haven't raised an issue since it's a simple fix, but below is a replication of how this can be an issue.
If a page has a huge element with a href or click action, just hovering or moving mouse over this element before hydration event can cause the click to trigger.
I think the logic got messed up in the below commit where before if the click event type was of click, function was returned.

24f05c7

Issue replicated: https://stackblitz.com/edit/nuxt-starter-n7nihz?file=app.vue

Additional context

Thanks for this amazing package. I hope to contribute more :)

@harlan-zw harlan-zw merged commit e0e6723 into harlan-zw:main Sep 6, 2024
1 check passed
@harlan-zw
Copy link
Owner

Nice catch, thanks for the fix!

@sauravbv
Copy link
Contributor Author

sauravbv commented Sep 6, 2024

@harlan-zw When can you release this?

@harlan-zw
Copy link
Owner

Done!

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.

2 participants