Skip to content

Commit 9c8e51e

Browse files
octo-patchocto-patch
andcommitted
fix(short-input): hide selected text to prevent overlay collision
The ShortInput component uses a transparent input layer beneath a formatted overlay. When users selected text and scrolled horizontally, the browser's ::selection pseudo-element overrode `color: transparent`, making raw unformatted text visible and causing visual collision with the overlay. Adding `selection:text-transparent` keeps the input text invisible under selection, while the overlay continues to display the correctly formatted highlighted text. Fixes #3389 Co-Authored-By: Octopus <liyuan851277048@icloud.com>
1 parent 489f2d3 commit 9c8e51e

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

  • apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/components/sub-block/components/short-input

apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/components/sub-block/components/short-input/short-input.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -347,7 +347,7 @@ export const ShortInput = memo(function ShortInput({
347347
<>
348348
<Input
349349
ref={ref as React.RefObject<HTMLInputElement>}
350-
className='allow-scroll w-full overflow-auto text-transparent caret-foreground [-ms-overflow-style:none] [scrollbar-width:none] placeholder:text-muted-foreground/50 [&::-webkit-scrollbar]:hidden'
350+
className='allow-scroll w-full overflow-auto text-transparent selection:text-transparent caret-foreground [-ms-overflow-style:none] [scrollbar-width:none] placeholder:text-muted-foreground/50 [&::-webkit-scrollbar]:hidden'
351351
readOnly={readOnly}
352352
placeholder={placeholder ?? ''}
353353
type='text'

0 commit comments

Comments
 (0)