Skip to content

🎥 Make videos programmatically with React

fix scrollbars showing up when pressing arrow right key when already at the end of the timeline

Jonny Burger3cde6df19bfa
diff --git a/packages/cli/src/editor/components/PlayPause.tsx b/packages/cli/src/editor/components/PlayPause.tsx
index 222dd7b98b..65520be75d 100644
--- a/packages/cli/src/editor/components/PlayPause.tsx
+++ b/packages/cli/src/editor/components/PlayPause.tsx
@@ -133,7 +133,7 @@ export const PlayPause: React.FC<{
ensureFrameIsInViewport({
direction: 'fit-right',
durationInFrames: getCurrentDuration(),
- frame: getCurrentFrame() + 1,
+ frame: Math.min(getCurrentDuration() - 1, getCurrentFrame() + 1),
});
}