scroll-into-view and overflow-y: auto?

15 views
Skip to first unread message

dontwantto...@googlemail.com

unread,
Mar 25, 2019, 5:17:53 PM3/25/19
to intercooler-js
Hello,

I am having my first experiences with intercooler.js and all went well for my first infinitely scrolling table with Django + intercooler.js. However, as my next step, I tried to constrain my table in height by packing it into a div with a max-height: 500px and overflow-y: auto. This results in several consecutive triggers of scroll-into-view events on my full-screen PC. On a simulated mobile device (Chrome F12) it doesn't trigger the second page ever.

Is intercooler.js meant to be compatible with the overflow-y: auto construct? Are there working examples of a div constrained in height combined with infinite scrolling?

Sincerely,
Tilo

Anders Baumann

unread,
Mar 26, 2019, 7:23:37 AM3/26/19
to intercooler-js
Could it be related to this issue: https://github.com/intercoolerjs/intercooler-js/issues/215

Anders

Carson Gross

unread,
Mar 26, 2019, 4:28:32 PM3/26/19
to dontwantto...@googlemail.com, intercooler-js
Yeah, as I said on

The logic is pretty simple, and is based on the window scroll state.  Within a constrained div it wouldn't work.

I could see trying to figure out the scroll state within a parent div, maybe that's possible.  But it sounds complicated and, if I'm being honest, I prefer the browsers native scrolling to most scrollable divs I come across.

Cheers,
Carson

On Mar 26 2019, at 4:23 am, Anders Baumann <baum...@gmail.com> wrote:

Anders

--
You received this message because you are subscribed to the Google Groups "intercooler-js" group.
To unsubscribe from this group and stop receiving emails from it, send an email to intercooler-j...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

dontwantto...@googlemail.com

unread,
Mar 26, 2019, 5:21:10 PM3/26/19
to intercooler-js
Thanks for the responses! Understood. I am not ready to give up and go back to paging yet. I think I will try to use the power of open source and mix myself a combination of intercooler.js with this library: https://github.com/hashchange/jquery.isinview
Seems to be specifically designed to cover my case.
I have to use a UI design where the screen is divided into "tiles". Some of them have lists in them and I want to allow the user to hover the mouse over them and use the scroll wheel infinitely.

Tilo

Carson Gross

unread,
Mar 26, 2019, 5:44:54 PM3/26/19
to dontwantto...@googlemail.com, intercooler-js
Sounds good, if your research shows it would be easy to add support for it to intercooler please let me know, we can try to work it into the main library.

Cheers,
Carson

dontwantto...@googlemail.com

unread,
Mar 26, 2019, 8:27:10 PM3/26/19
to intercooler-js
Check out PR #279 on your github. It does exactly what I had hoped it would, but requires to pull in 2 external libraries which adds to the size (not a lot, but still...). Since my tiled design can have multiple of these scroll-into-view triggers, I had to do some rework to eliminate the single global _scrollHandler. I also still have an unresolved TODO. But I think it nicely illustrates the idea.
Reply all
Reply to author
Forward
0 new messages