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

Allow Modal's to scroll on mobile devices #242

Closed
petewins opened this issue Apr 12, 2024 · 3 comments
Closed

Allow Modal's to scroll on mobile devices #242

petewins opened this issue Apr 12, 2024 · 3 comments

Comments

@petewins
Copy link

petewins commented Apr 12, 2024

Is your feature request related to a problem? Please describe.
On mobile, user's can't scroll up inside a modal, It seems they are able to scroll down but scrolling back up will trigger the modals swipe to close.

Describe the solution you'd like
Not sure what will be the ideal solution, but one thing that comes to mind is a prop to opt-out?

Describe alternatives you've considered
Might add an onMove event.stopPropagation() on my overflow container to temp prevent this behavior

example: Mobile devices currently can't scroll up, it closes the modal instead

Screen.Recording.2024-04-11.at.11.43.22.PM.mov
@petewins petewins changed the title Allow Modal's swipe to close to be optional Allow Modal's to scroll on mobile devices Apr 12, 2024
@blvdmitry blvdmitry moved this to 2.11.0 in Reshaped Apr 12, 2024
@blvdmitry
Copy link
Contributor

Good point, I think it might be better to prevent swiping while scrolling is meant to happen first of all (can detect that based on the elements dimensions and scroll position). That should resolve the issue without opting-out manually with a prop

@blvdmitry blvdmitry moved this from 2.11.0 to In Progress in Reshaped Apr 12, 2024
@blvdmitry
Copy link
Contributor

Can you check if this works for you in 2.10.19? There already was partial handling of this use case which I forgot existed but it wasn't handling it correctly in some cases

Area.mp4

@github-project-automation github-project-automation bot moved this from In Progress to Waiting for the release in Reshaped Apr 12, 2024
@petewins
Copy link
Author

@blvdmitry, works as expected now, thank you for a quick fix

@blvdmitry blvdmitry moved this from Waiting for the release to Recently completed in Reshaped Apr 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Recently completed
Development

No branches or pull requests

2 participants