Skip to content

Commit

Permalink
fix: : in Prompt selecting text reveal hidden text
Browse files Browse the repository at this point in the history
  • Loading branch information
mikbry authored Mar 11, 2024
2 parents 0eebe4b + 1809b45 commit cbfe3fb
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
2 changes: 1 addition & 1 deletion webapp/components/views/Threads/Prompt.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ export default function Prompt({
<span className="text-sm text-red-500">{errorMessage}</span>
</div>
) : null}
<div className="flex w-full flex-row items-center rounded-md border border-black/10 bg-white p-3 dark:border-neutral-700 dark:bg-neutral-900 dark:text-white">
<div className="flex w-full flex-row items-center rounded-md border border-input p-3 focus-within:border-transparent focus-within:ring-1 focus-within:ring-ring ">
<Button
disabled={disabled || isLoading}
type="button"
Expand Down
7 changes: 5 additions & 2 deletions webapp/components/views/Threads/PromptCommandInput.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -206,13 +206,16 @@ function PromptCommandInput({
ref={textareaRef}
autoComplete="off"
autoCorrect="off"
className={cn(className, 'border-0 text-transparent')}
className={cn(
className,
'focus-visible:ring-none border-none text-transparent shadow-none focus-visible:border-none focus-visible:shadow-none focus-visible:outline-none',
)}
value={value?.raw || ''}
placeholder={placeholder}
onChange={handleValueChange}
onFocus={handleFocus}
>
<p className="textarea-overlay pointer-events-none absolute left-[1px] top-[1px] h-full w-full px-3 py-2 text-sm">
<p className="textarea-overlay pointer-events-none absolute left-[0.01px] top-[0.1px] h-full w-full px-3 py-2 text-sm">
{value?.tokens?.map((token) =>
token.type !== 'newline' ? (
<span key={token.index} className={cn('', getTokenColor(token))}>
Expand Down

0 comments on commit cbfe3fb

Please sign in to comment.