civiccc / react-waypoint

A React component to execute a function whenever you scroll to an element.
MIT License
4.08k stars 208 forks source link

onEnter event not working on Firefox #331

Open farshidmk opened 3 years ago

farshidmk commented 3 years ago

I have an infinite list and to show list elements use the map function. after the map, I use the wayPoint onEnter function for fetching more items. It works fine in chrome but in Firefox it's not working. when adding some element to show after the waypoint, onEnter events work and fetch new data (for example add some text in tag p)

`{!isFetchingMoreThreads && canFetchMoreThreads * PAGE_SIZE < totalThreadsCount ? ( <>

for Waypoint working on fire fox

                  <Waypoint onEnter={() => fetchMoreThreads()} />
                </>
              ) : isFetchingMoreThreads ? (                    
                  <CircularProgress />
              ) : null}`

Here is my code and if I remove the <p> element its not fetch new data (just in firefox this happens). How should I fix the problem without adding a useless element?