You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
here is listening to the window scroll event, but what if the scroll area is a div not the window, it seems won't be able to work , especially onFetchMore . so... i am getting stuck in this issue
So the suggestion by @vitorzerbeto doesn't seem to work. I can get the querySelector to find what I believe is the appropriate div, but the 'scroll' event is never fired because I don't think it's actually scrolling anything. Based on the styles I'm seeing added to the .ptr__children div, they are applying a transform to that div such that it's not scrolling, but being offset as the user clicks and drags.
I'm in a situation where my child elements are divs with an onClick event that if my drag/scroll starts and ends inside of that div, then it's firing the onClick method when I don't think it should because the user was merely scrolling/click and dragging. Eventually, my project will be run inside of a native App wrapper, so the events will be touch down and drag, which is extensibly a scroll on mobile, and generally with native scroll views, the act of scrolling/dragging cancels out the event chain to propagate touch events to the children.
So I'm looking for a way to detect that click/drag event in order to perform a similar function of not passing on those events to the children whilst scrolling. Is there a way to do this with the component as is?
here is listening to the window scroll event, but what if the scroll area is a div not the window, it seems won't be able to work , especially
onFetchMore
. so... i am getting stuck in this issuereact-simple-pull-to-refresh/src/components/pull-to-refresh.tsx
Line 56 in b91b3ef
The text was updated successfully, but these errors were encountered: