Create polished demo videos without editing skills. Mac/Windows/Linux
fix problems called out by CodeRabbits
Alan Trebugeais3b7aca42c520
diff --git a/src/components/video-editor/SliderControl.tsx b/src/components/video-editor/SliderControl.tsxindex 3de99ed7..25a1c145 100644--- a/src/components/video-editor/SliderControl.tsx+++ b/src/components/video-editor/SliderControl.tsx@@ -69,11 +69,13 @@ export const SliderControl = memo(function SliderControl({const rawValue = min + normalized * (max - min);const nextValue = clamp(quantizeToStep(rawValue, min, step), min, max);const finalValue = Number(nextValue.toFixed(6));- const currentPct = (normalized * 100).toFixed(4);+ const finalPct = (((finalValue - min) / (max - min || 1)) * 100).toFixed(4);// Direct DOM update for instant feedbackif (rootRef.current) {- rootRef.current.style.setProperty("--slider-pct", `${currentPct}%`);+ rootRef.current.style.setProperty("--slider-pct", `${finalPct}%`);+ rootRef.current.setAttribute("aria-valuenow", String(finalValue));+ rootRef.current.setAttribute("aria-valuetext", formatValue(finalValue));}if (valueTextRef.current) {valueTextRef.current.textContent = formatValue(finalValue);@@ -118,6 +120,11 @@ export const SliderControl = memo(function SliderControl({if (requestRef.current) {cancelAnimationFrame(requestRef.current);+ requestRef.current = null;+ }++ if (finishEvent.type === "pointerup") {+ updateValue(finishEvent.clientX);}target.releasePointerCapture(pointerId);