react-infinite-scroller icon indicating copy to clipboard operation
react-infinite-scroller copied to clipboard

Not working on Mobile browsers on iOS

Open nmqanh opened this issue 8 years ago • 6 comments

I tried with Safari and Chrome on iOS 10 and it's not querying data. It just shows the loader and gets stuck there forever.

nmqanh avatar Jun 20 '17 22:06 nmqanh

I checked and it's also not working on small width in our case even using Chrome on MAC

nmqanh avatar Jun 20 '17 23:06 nmqanh

yeah I'm having some trouble too unless I turn off useWindow

acomito avatar Jun 25 '17 19:06 acomito

Can easily be reproduced using chrome inspector and changing size to smaller device. Has anyone found a workaround for this issues?

mihaiserban avatar Sep 29 '17 15:09 mihaiserban

pff managed to debug the issue and provide a fix. scrollTop is always 0 on small screens. Needs to be fixed for other branches as well.

InfiniteScroll.js

Replace else { offset = el.scrollHeight - el.parentNode.scrollTop - el.parentNode.clientHeight; } with else { var elemTop = el.getBoundingClientRect().top - el.offsetTop; offset = el.scrollHeight - Math.abs(elemTop) - el.parentNode.clientHeight; }

mihaiserban avatar Sep 29 '17 22:09 mihaiserban

I recently updated the issue templates on this repo so that I can identify the bugs with this repo.

Please clone your layout and use of react-infinite-scroller by forking this Code Sandbox and linking it here. Doing so will massively expedite getting the bug fixed! 👊

danbovey avatar May 14 '18 18:05 danbovey

Turns out this component was conflicting with this rule in our scss:

@include media('<=tablet') {
      overflow-x: hidden;
      overflow-y: scroll;
      -webkit-overflow-scrolling: touch;

aiham avatar Oct 09 '18 01:10 aiham