Skip to content

🎥 Make videos programmatically with React

Prevent selecting Studio control labels

Jonny Burger73e3c27e024f
diff --git a/packages/studio/src/components/InspectorPanel/common.tsx b/packages/studio/src/components/InspectorPanel/common.tsx
index 4879e3cf37..6a589efa83 100644
--- a/packages/studio/src/components/InspectorPanel/common.tsx
+++ b/packages/studio/src/components/InspectorPanel/common.tsx
@@ -146,6 +146,7 @@ const inlineLabelText: React.CSSProperties = {
minWidth: 0,
overflow: 'hidden',
textOverflow: 'ellipsis',
+ userSelect: 'none',
whiteSpace: 'nowrap',
};
diff --git a/packages/studio/src/components/InspectorPanel/styles.ts b/packages/studio/src/components/InspectorPanel/styles.ts
index 4e1d823773..b68146d762 100644
--- a/packages/studio/src/components/InspectorPanel/styles.ts
+++ b/packages/studio/src/components/InspectorPanel/styles.ts
@@ -198,6 +198,7 @@ export const detailLabel: React.CSSProperties = {
minWidth: 0,
overflow: 'hidden',
textOverflow: 'ellipsis',
+ userSelect: 'none',
whiteSpace: 'nowrap',
};
diff --git a/packages/studio/src/components/InspectorSourceLocation.tsx b/packages/studio/src/components/InspectorSourceLocation.tsx
index 4eb901cbf2..80a4b55acf 100644
--- a/packages/studio/src/components/InspectorSourceLocation.tsx
+++ b/packages/studio/src/components/InspectorSourceLocation.tsx
@@ -25,10 +25,15 @@ const sourceLocationStyle: React.CSSProperties = {
textAlign: 'left',
textDecoration: 'none',
textOverflow: 'ellipsis',
+ userSelect: 'none',
whiteSpace: 'nowrap',
width: 'fit-content',
};
+const quickActionStyle: React.CSSProperties = {
+ userSelect: 'none',
+};
+
const sourceLocationLabelStyle: React.CSSProperties = {
color: 'inherit',
display: 'block',
@@ -104,6 +109,7 @@ export const InspectorSourceLocation: React.FC<{
disabled={!canOpen}
onClick={onClick}
renderIcon={(iconColor) => renderIcon?.(iconColor)}
+ style={quickActionStyle}
title={fileLocation ?? undefined}
>
{label}
diff --git a/packages/studio/src/components/QuickSwitcher/ExplorerQuickSwitcherTrigger.tsx b/packages/studio/src/components/QuickSwitcher/ExplorerQuickSwitcherTrigger.tsx
index fac615e0de..82f5ab2183 100644
--- a/packages/studio/src/components/QuickSwitcher/ExplorerQuickSwitcherTrigger.tsx
+++ b/packages/studio/src/components/QuickSwitcher/ExplorerQuickSwitcherTrigger.tsx
@@ -38,6 +38,7 @@ const quickSwitcherTrigger: React.CSSProperties = {
border: 'none',
flex: 1,
appearance: 'none',
+ userSelect: 'none',
...hoverableStyle({
idleBackground: WHITE_ALPHA_06,
hoverBackground: WHITE_ALPHA_06,
diff --git a/packages/studio/src/components/TimelineCombobox.tsx b/packages/studio/src/components/TimelineCombobox.tsx
index c828813d82..139256b411 100644
--- a/packages/studio/src/components/TimelineCombobox.tsx
+++ b/packages/studio/src/components/TimelineCombobox.tsx
@@ -19,6 +19,7 @@ const label: React.CSSProperties = {
overflow: 'hidden',
textAlign: 'left',
textOverflow: 'ellipsis',
+ userSelect: 'none',
whiteSpace: 'nowrap',
};