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 always being applied #55

Merged
merged 1 commit into from
Aug 13, 2024

Conversation

sauravbv
Copy link
Contributor

@sauravbv sauravbv commented Aug 13, 2024

Description

This PR fixes the replayClick option. Until now, the replay script was always added to the HTML source regardless the option was set to false or not used. Hence, all click or touch events before hydration is replayed.

This solves a couple of things:

  1. replayClick option will work as intended (false) as default
  2. Fixes the link trigger issues on mobile devices on touch since the touch events are being replayed if the hydration event is not completed.

Linked Issues

  1. On click events and links getting triggered on scroll primarily on mobile devices.  #54
  2. Page links automatically triggered on Hydration event #53
  3. Wrong scroll behaviour when module is manual #47

Additional context

@harlan-zw harlan-zw changed the title Fix replay click option fix: replayClick always being applied Aug 13, 2024
@harlan-zw
Copy link
Owner

Damn good catch, thank you 🙏

@harlan-zw harlan-zw merged commit 594b3bd into harlan-zw:main Aug 13, 2024
1 check passed
@sauravbv
Copy link
Contributor Author

@harlan-zw Thanks for the quick review and merge.
Is there an approximate ETA for the release of this?

@harlan-zw
Copy link
Owner

Yup, right now 👍

@gsriram24
Copy link

Thanks @harlan-zw! this was affecting our project hugely, thanks for the quick merge and release.

@harlan-zw
Copy link
Owner

Thank you @sauravbv, PRs always welcome for quick review 😄

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.

3 participants