Skip to content

Infisical is the open-source platform for securing secrets, certificates, access, and AI Agents.

fix: trimming

nafees nazikef7bf0939883
diff --git a/frontend/src/components/v2/SecretInput/SecretInput.tsx b/frontend/src/components/v2/SecretInput/SecretInput.tsx
index 1573fa961d..10ed24f438 100644
--- a/frontend/src/components/v2/SecretInput/SecretInput.tsx
+++ b/frontend/src/components/v2/SecretInput/SecretInput.tsx
@@ -56,12 +56,12 @@ export const SecretInput = forwardRef<HTMLTextAreaElement, Props>(
const update = (code: string) => {
setText(code);
if (onChange) {
- onChange(code);
+ onChange(code.trim());
}
};
const onInput = (event: any) => {
- const code = event.target.value.trim() || "";
+ const code = event.target.value || "";
update(code);
};
@@ -80,7 +80,7 @@ export const SecretInput = forwardRef<HTMLTextAreaElement, Props>(
<textarea
aria-label="secret value"
ref={ref}
- className={`textarea absolute inset-0 h-full overflow-hidden block focus:border-0 resize-none bg-transparent text-transparent ${commonClassName}`}
+ className={`textarea absolute inset-0 block h-full resize-none overflow-hidden bg-transparent text-transparent focus:border-0 ${commonClassName}`}
value={text}
onChange={onInput}
onFocus={() => setIsSecretFocused.on()}