I created a small Pinentry UI using gpui-component and noticed that the masked input is missing some key security features.
I would like to tighten up the password input behavior:
- Security: Prevent "Copy" actions (both context menu and keyboard shortcuts) to stop passwords from entering the system clipboard when masked.
- UX: Override default
Ctrl+Backspace behavior. Instead of deleting the previous word, it should clear the entire input value before cursor when masked.
Steps to Reproduce:
- Enter text into the Password Input.
- Try to copy the text using the context menu or keyboard shortcuts → Current: Text is copied.
- Place the cursor in the middle of the password and press
Ctrl+Backspace → Current: Only a portion of the password is deleted.
I am happy to submit a PR for this if it's acceptable.
Architectural Question:
Should I:
- update the behavior of the existing Input component when
mask_toggle is active
- create new behavior flags for the existing Input component
- propose a separate PasswordInput component to keep the general Input logic clean?
I created a small Pinentry UI using
gpui-componentand noticed that the masked input is missing some key security features.I would like to tighten up the password input behavior:
Ctrl+Backspacebehavior. Instead of deleting the previous word, it should clear the entire input value before cursor when masked.Steps to Reproduce:
Ctrl+Backspace→ Current: Only a portion of the password is deleted.I am happy to submit a PR for this if it's acceptable.
Architectural Question:
Should I:
mask_toggleis active