Disable navigation on swipe #11
-
|
Hello, I’m implementing a feature where I need to draw on the slide. Hence, i’d need to disable the swiping/dragging action that allows navigating between slides so it doesn’t confuse with the drawing action. Is there a way I can do this? |
Beta Was this translation helpful? Give feedback.
Answered by
igordanchenko
Feb 27, 2025
Replies: 1 comment 1 reply
-
|
Hi there! The lightbox uses <div
onWheel={(event) => event.stopPropagation()}
onKeyDown={(event) => event.stopPropagation()}
onPointerDown={(event) => event.stopPropagation()}
>
{
// custom slide
}
</div>Hope this helps. |
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
igordanchenko
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi there!
The lightbox uses
onWheel,onKeyDownandonPointerDownevents for mouse wheel / trackpad, keyboard and mouse / touch navigation. To achieve the behavior you describe, you'd need to stop propagation of corresponding events from your custom slides.Hope this helps.