Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Triggers when scrolling #361

Open
schonarth opened this issue Mar 9, 2024 · 1 comment
Open

Triggers when scrolling #361

schonarth opened this issue Mar 9, 2024 · 1 comment

Comments

@schonarth
Copy link

If I touch anywhere just to scroll my outer ScrollView around, the library will immediately fire, causing my expanded component to collapse, which is not what I intended.

Since IMHO that should be the default behavior, I just pushed PR #360 to fire the event on touchEnd instead of touchStart, thus allowing the OS to decide whether this is going to be a scroll or not.

@nyius
Copy link

nyius commented May 14, 2024

Did you ever get an update into this? Noticing the same behavior myself.
The OutsidePressHandler should fire on touchEnd, or atleast have that be an option

*** Edit

For anyone looking for a quick solution, I edited container.tsx to simply change the view from onTouchStart to onTouchEnd

   default: ( 
    <View {...props} onTouchEnd={runEvents}>
        {props.children}
      </View>
    )

This seemed to do the trick and will only detect the outside press when the user stops touching the screen.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants