fix: error js
This commit is contained in:
@@ -170,7 +170,10 @@ export default function VerticalSlider({
|
||||
async function endDrag(e: React.PointerEvent<HTMLDivElement>) {
|
||||
if (!dragging.current) return;
|
||||
|
||||
const target = e.currentTarget;
|
||||
const pointerId = e.pointerId;
|
||||
const finalValue = dragValue.current;
|
||||
|
||||
const success = await onChange?.(finalValue);
|
||||
|
||||
dragging.current = false;
|
||||
@@ -181,8 +184,8 @@ export default function VerticalSlider({
|
||||
onInput?.(value);
|
||||
}
|
||||
|
||||
if (e.currentTarget.hasPointerCapture(e.pointerId)) {
|
||||
e.currentTarget.releasePointerCapture(e.pointerId);
|
||||
if (target.hasPointerCapture(pointerId)) {
|
||||
target.releasePointerCapture(pointerId);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user