Skip to content

Commit 09af6fb

Browse files
committed
improve resizer for file preview for html files
1 parent 523aff8 commit 09af6fb

File tree

1 file changed

+5
-2
lines changed
  • apps/sim/app/workspace/[workspaceId]/files/components/file-viewer

1 file changed

+5
-2
lines changed

apps/sim/app/workspace/[workspaceId]/files/components/file-viewer/file-viewer.tsx

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -236,7 +236,8 @@ function TextEditor({
236236
style={showPreview ? { width: `${splitPct}%`, flexShrink: 0 } : undefined}
237237
className={cn(
238238
'h-full resize-none border-0 bg-transparent p-[24px] font-mono text-[14px] text-[var(--text-body)] outline-none placeholder:text-[var(--text-subtle)]',
239-
!showPreview && 'w-full'
239+
!showPreview && 'w-full',
240+
isResizing && 'pointer-events-none'
240241
)}
241242
/>
242243
{showPreview && (
@@ -254,7 +255,9 @@ function TextEditor({
254255
<div className='-translate-x-[0.5px] pointer-events-none absolute top-0 z-20 h-full w-[2px] bg-[var(--selection)]' />
255256
)}
256257
</div>
257-
<div className='min-w-0 flex-1 overflow-hidden'>
258+
<div
259+
className={cn('min-w-0 flex-1 overflow-hidden', isResizing && 'pointer-events-none')}
260+
>
258261
<PreviewPanel content={content} mimeType={file.type} filename={file.name} />
259262
</div>
260263
</>

0 commit comments

Comments
 (0)