Skip to content

Cannot stop event bubbling? #353

Answered by dbismut
magikarp28 asked this question in Q&A
Sep 21, 2021 · 1 comments · 5 replies
Discussion options

You must be logged in to vote

I'm pretty sure the drag you're seeing on the image is the native drag and drop from the browser which you won't disable with stopPropagation. There's a few things you could do, like trying to event.preventDefault() (but with eventOptions.capture set to true).

Simplest solution would probably be to have the css pointer-events: none on your image element.

But that's hard to assess without a sandbox: giving a minimal sandbox in your issues / questions simplifies answers drastically.

Also, you can try upgrading to @use-gesture/react which will release shortly (in that case, make sure your rename domTarget to target.

Replies: 1 comment 5 replies

Comment options

You must be logged in to vote
5 replies
@magikarp28
Comment options

@dbismut
Comment options

@magikarp28
Comment options

@dbismut
Comment options

@magikarp28
Comment options

Answer selected by magikarp28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants