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: visibility variants not triggered when visible on load #171

Merged

Conversation

BobbieGoede
Copy link
Member

@BobbieGoede BobbieGoede commented Feb 20, 2024

Issues

This should fix visibility variants not being triggered when the element should already be visible on page load. It's a bit of a head scratcher, but I think this issue may be exclusive to directive usage (not when using <Motion />).

I'm assuming that useIntersectionObserver doesn't play nice when called in created simply based on v-intersection-observer directive using the mounted hook in @vueuse/components (see source here).

Unfortunately I wasn't able to add a test for this, maybe intersection observer doesn't work in happy-dom? If anyone knows how to properly test this behaviour and could give me pointers on how to do so I would feel a lot better about this fix 😅..

@dosubot dosubot bot added the size:S This PR changes 10-29 lines, ignoring generated files. label Feb 20, 2024
@BobbieGoede
Copy link
Member Author

@cpreston321 and/or @Tahul
Pinging to request review 😅 (can't assign reviewers)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
size:S This PR changes 10-29 lines, ignoring generated files.
Projects
None yet
2 participants