8000 fix mouse off bug · coder/coder@7c75046 · GitHub
[go: up one dir, main page]

Skip to content

Commit 7c75046

Browse files
committed
fix mouse off bug
1 parent 412e64b commit 7c75046

File tree

1 file changed

+9
-8
lines changed

1 file changed

+9
-8
lines changed

site/src/modules/workspaces/DynamicParameter/DynamicParameter.tsx

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ export const DynamicParameter: FC<DynamicParameterProps> = ({
8383
/>
8484
<div className="max-w-lg">
8585
{parameter.form_type === "input" ||
86-
parameter.form_type === "textarea" ? (
86+
parameter.form_type === "textarea" ? (
8787
<DebouncedParameterField
8888
id={id}
8989
parameter={parameter}
@@ -322,8 +322,8 @@ const DebouncedParameterField: FC<DebouncedParameterFieldProps> = ({
322322
className={cn(
323323
"overflow-y-auto max-h-[500px]",
324324
parameter.styling?.mask_input &&
325-
!showMaskedInput &&
326-
"[-webkit-text-security:disc]",
325+
!showMaskedInput &&
326+
"[-webkit-text-security:disc]",
327327
)}
328328
value={localValue}
329329
onChange={(e) => {
@@ -343,6 +343,7 @@ const DebouncedParameterField: FC<DebouncedParameterFieldProps> = ({
343343
variant="subtle"
344344
size="icon"
345345
onMouseDown={() => setShowMaskedInput(true)}
346+
onMouseOut={() => setShowMaskedInput(false)}
346347
onMouseUp={() => setShowMaskedInput(false)}
347348
disabled={disabled}
348349
>
@@ -399,6 +400,7 @@ const DebouncedParameterField: FC<DebouncedParameterFieldProps> = ({
399400
variant="subtle"
400401
size="icon"
401402
onMouseDown={() => setShowMaskedInput(true)}
403+
onMouseOut={() => setShowMaskedInput(false)}
402404
onMouseUp={() => setShowMaskedInput(false)}
403405
disabled={disabled}
404406
>
@@ -689,11 +691,10 @@ const ParameterDiagnostics: FC<ParameterDiagnosticsProps> = ({
689691
return (
690692
<div
691693
key={`parameter-diagnostic-${diagnostic.summary}-${index}`}
692-
className={`text-xs px-1 ${
693-
diagnostic.severity === "error"
694-
? "text-content-destructive"
695-
: "text-content-warning"
696-
}`}
694+
className={`text-xs px-1 ${diagnostic.severity === "error"
695+
? "text-content-destructive"
696+
: "text-content-warning"
697+
}`}
697698
>
698699
<p className="font-medium">{diagnostic.summary}</p>
699700
{diagnostic.detail && <p className="m-0">{diagnostic.detail}</p>}

0 commit comments

Comments
 (0)
0