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

time to time observer not attached to DOM element #14

Open
nosovk opened this issue Apr 12, 2021 · 4 comments
Open

time to time observer not attached to DOM element #14

nosovk opened this issue Apr 12, 2021 · 4 comments

Comments

@nosovk
Copy link
Contributor

nosovk commented Apr 12, 2021

Currently intersection observer not always initialized after hydration.

For example - https://github.com/MailCheck-co/mailcheck.site/blob/master/src/components/Partners.svelte

It's live on https://www.mailcheck.co/ - if you will start scrolling during load it will never trigger.

That PR #13 supposed to fix such a behavioure, but seems like problem does not fixed by moving subscription to onMount handler.

@timsully
Copy link

Any update on this, @nosovk @metonym ? Or if there are steps to resolve this, what steps should I take to contribute?

@nosovk
Copy link
Contributor Author

nosovk commented Jun 17, 2021

We now adopting https://github.com/maciekgrzybek/svelte-inview
will see result at https://mailcheck.co after merge of MailCheck-co/mailcheck.site#281

@j2l
Copy link

j2l commented Nov 23, 2021

We now adopting https://github.com/maciekgrzybek/svelte-inview

This should be in the readme :)

I spent quite some time scratching my head about weird behavior with this one. Fixed by using bare IntersectionObserver.
BTW, inview installs 19 packages, it's a no-no for me.

@nosovk
Copy link
Contributor Author

nosovk commented Nov 23, 2021

Actually there are no dependencies in it, all listed it devDeps, that needed to make bundle (rollup, typescript ts). There was missed peerDeps in it, but there is a PR to fix that.

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

No branches or pull requests

3 participants