Skip to content

🎥 Make videos programmatically with React

`@remotion/studio`: Fix pixelated cursors after zooming

Jonny Burger7adff4c13acb
diff --git a/packages/example/e2e/preview-compositing.test.mts b/packages/example/e2e/preview-compositing.test.mts
index 68c19dfbe5..0d27baefae 100644
--- a/packages/example/e2e/preview-compositing.test.mts
+++ b/packages/example/e2e/preview-compositing.test.mts
@@ -12,7 +12,7 @@ test('keeps the scaled composition on its own compositing layer', async ({
'.remotion-studio-composition-container > div',
);
await expect(preview).toBeVisible();
- await expect(preview).toHaveCSS('will-change', 'transform');
+ await expect(preview).toHaveCSS('will-change', 'opacity');
} finally {
await stopStudio();
}
diff --git a/packages/studio/src/components/Preview.tsx b/packages/studio/src/components/Preview.tsx
index 39c7575e9c..2cce496895 100644
--- a/packages/studio/src/components/Preview.tsx
+++ b/packages/studio/src/components/Preview.tsx
@@ -73,8 +73,9 @@ const containerStyle = (options: {
return {
transform: `scale(${options.scale})`,
// Keep the scaled composition on its own layer so the checkerboard does
- // not bleed through its edges at fractional preview scales.
- willChange: 'transform',
+ // not bleed through its edges at fractional preview scales. Using
+ // 'transform' caches the rasterization scale and blurs content after zooming.
+ willChange: 'opacity',
marginLeft: options.xCorrection,
marginTop: options.yCorrection,
width: options.width,