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

Disable touch in carousel for UI element compatibility #914

Merged
merged 2 commits into from
Mar 6, 2024

Conversation

akshayka
Copy link
Contributor

@akshayka akshayka commented Mar 6, 2024

When touch-to-swipe was active, trying to scrub a slider ended up changing the slide instead

Copy link

vercel bot commented Mar 6, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
marimo-docs ✅ Ready (Inspect) Visit Preview 💬 Add feedback Mar 6, 2024 6:03pm
marimo-storybook ✅ Ready (Inspect) Visit Preview 💬 Add feedback Mar 6, 2024 6:03pm

@@ -74,7 +74,8 @@ const CarouselComponent = ({
zoom={{
maxRatio: 5,
}}
simulateTouch={true}
// touch controls interfere with UI elements
simulateTouch={false}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We can also add onPointerDown={Events.stopPropagation()} to UI elements that drag like the slider. if we still want to keep this enabled

@akshayka akshayka merged commit 578e590 into main Mar 6, 2024
29 checks passed
@akshayka akshayka deleted the aka/fix-sliders-in-carousel branch March 6, 2024 18:24
@github-actions github-actions bot locked and limited conversation to collaborators Mar 6, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants