Skip to content

🎥 Make videos programmatically with React

Disable pointer events on the hidden tab close button

Andrii Drokeb76f609ec7c
diff --git a/packages/studio/src/components/CanvasTabs.tsx b/packages/studio/src/components/CanvasTabs.tsx
index 9e55e43bf2..38d97ae789 100644
--- a/packages/studio/src/components/CanvasTabs.tsx
+++ b/packages/studio/src/components/CanvasTabs.tsx
@@ -470,7 +470,11 @@ const CanvasTab: React.FC<{
onClose();
}}
renderAction={() => <CancelIcon height={16} width={16} />}
- style={{...closeStyle, opacity: showCloseButton ? 1 : 0}}
+ style={{
+ ...closeStyle,
+ opacity: showCloseButton ? 1 : 0,
+ pointerEvents: showCloseButton ? 'auto' : 'none',
+ }}
variant={null}
onFocus={() => setCloseButtonFocused(true)}
onBlur={() => setCloseButtonFocused(false)}