Stop movimentation when i drag for the right or left the mouse in text of my plugin input #203
-
Is your feature request related to a problem? Please describe.I create one InputPlugin, to create one caption to each slide, all work, but i need when i click in text of input and drag to left or right the yarl__swipe_offset value change. i want know if have one method to disable the change slides by drag to left right when i want, to disable My codes: LightBoxGallery InputEditCaption.tsx |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 6 replies
-
|
To prevent slide navigation in this case, you need to stop propagation of the following events on your topmost div element:
const stopPropagation = (event) => {
event.preventDefault();
event.stopPropagation();
};
<div
onPointerDown={stopPropagation}
onKeyDown={stopPropagation}
onWheel={stopPropagation}
// ...
/> |
Beta Was this translation helpful? Give feedback.
I'm not sure I understand your question. The following change in your
InputEditCaptionscomponent should address the issue you are seeing.