On mobile or I’d find you the link to the previous forum thread, but it’s worth asking if you’re using a table/thead?
(Edit: found it, My JS hook stopped working after i added phx-viewport-top - #3 by felix-starman)
It does not have a height so the phx-viewport-* attributes will always fail in fun ways.
I’m sorry if you covered this earlier but one option is an element at the bottom of your page with initial CSS that pushes it outside of the initial viewport (e.g. top margin100vh or something, I don’t remember) and then using IntersectionObserver. I think in another thread I posted a working example. I don’t know if phx-viewport-* would rely on streams, but I wouldn’t imagine it would? IntersectionObserver should get you basically the same thing though and then you get to control it and can tweak it so you don’t get a flood of callbacks on scroll