Skip to content

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

fix: secret input on tab moves to next field and masks value

ShubhamPalriwala9d46c269d488
diff --git a/frontend/src/components/v2/SecretInput/SecretInput.tsx b/frontend/src/components/v2/SecretInput/SecretInput.tsx
index 5e7bbef786..aca4d45d35 100644
--- a/frontend/src/components/v2/SecretInput/SecretInput.tsx
+++ b/frontend/src/components/v2/SecretInput/SecretInput.tsx
@@ -96,8 +96,12 @@ export const SecretInput = forwardRef<HTMLTextAreaElement, Props>(
}}
disabled={isDisabled}
spellCheck={false}
- onBlur={(evt) => {
- onBlur?.(evt);
+ onKeyDown={(evt) => {
+ if (evt.key === "Tab") {
+ setIsSecretFocused.off();
+ }
+ }}
+ onBlur={() => {
setIsSecretFocused.off();
}}
value={value || ""}
diff --git a/frontend/src/views/ShareSecretPage/components/AddShareSecretModal.tsx b/frontend/src/views/ShareSecretPage/components/AddShareSecretModal.tsx
index 2fda35be4a..7ec9f95ad0 100644
--- a/frontend/src/views/ShareSecretPage/components/AddShareSecretModal.tsx
+++ b/frontend/src/views/ShareSecretPage/components/AddShareSecretModal.tsx
@@ -178,7 +178,7 @@ export const AddShareSecretModal = ({ popUp, handlePopUpToggle }: Props) => {
errorText={error?.message}
>
<SecretInput
- isVisible
+ isVisible={false}
{...field}
containerClassName="py-1.5 rounded-md transition-all group-hover:mr-2 text-bunker-300 hover:border-primary-400/50 border border-mineshaft-600 bg-mineshaft-900 px-2 min-h-[100px]"
/>