mirror of
https://github.com/awatertrevi/infisical.git
synced 2026-10-08 05:27:52 +00:00
fix: scroll
This commit is contained in:
committed by
Akhil Mohan
parent
63e8ecce5b
commit
f84235eea3
@@ -66,33 +66,36 @@ export const SecretInput = forwardRef<HTMLTextAreaElement, Props>(
|
|||||||
};
|
};
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className="relative">
|
<div className="overflow-auto" style={{ maxHeight: `${21 * 7}px` }}>
|
||||||
<pre aria-hidden className="m-0 " style={{ whiteSpace: "break-spaces" }}>
|
<div className="relative overflow-hidden">
|
||||||
<code className={`code inline-block w-full ${commonClassName}`}>
|
<pre aria-hidden className="m-0 ">
|
||||||
<span
|
<code className={`inline-block w-full ${commonClassName}`}>
|
||||||
dangerouslySetInnerHTML={{
|
<span
|
||||||
__html: syntaxHighlight(text, isVisible || isSecretFocused) ?? ""
|
style={{ whiteSpace: "break-spaces" }}
|
||||||
}}
|
dangerouslySetInnerHTML={{
|
||||||
/>
|
__html: syntaxHighlight(text, isVisible || isSecretFocused) ?? ""
|
||||||
</code>
|
}}
|
||||||
</pre>
|
/>
|
||||||
|
</code>
|
||||||
|
</pre>
|
||||||
|
|
||||||
<textarea
|
<textarea
|
||||||
style={{ whiteSpace: "break-spaces" }}
|
style={{ whiteSpace: "break-spaces" }}
|
||||||
aria-label="secret value"
|
aria-label="secret value"
|
||||||
ref={ref}
|
ref={ref}
|
||||||
className={`textarea absolute inset-0 block h-full resize-none overflow-hidden bg-transparent text-transparent focus:border-0 ${commonClassName}`}
|
className={`absolute inset-0 block h-full resize-none overflow-hidden bg-transparent text-transparent no-scrollbar focus:border-0 ${commonClassName}`}
|
||||||
value={text}
|
value={text}
|
||||||
onChange={onInput}
|
onChange={onInput}
|
||||||
onFocus={() => setIsSecretFocused.on()}
|
onFocus={() => setIsSecretFocused.on()}
|
||||||
disabled={isDisabled}
|
disabled={isDisabled}
|
||||||
spellCheck={false}
|
spellCheck={false}
|
||||||
onBlur={() => {
|
onBlur={() => {
|
||||||
if (onBlur) onBlur();
|
if (onBlur) onBlur();
|
||||||
setIsSecretFocused.off();
|
setIsSecretFocused.off();
|
||||||
}}
|
}}
|
||||||
{...props}
|
{...props}
|
||||||
/>
|
/>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user