Privacy-first password manager with built-in email aliasing. Fully encrypted and self-hostable.
Hide browser extension autofill injected icon on key press (#653)
Leendert de Borsta0a3a2e14ad7
diff --git a/browser-extensions/chrome/src/contentScript/Form.ts b/browser-extensions/chrome/src/contentScript/Form.tsindex e85635e54..2f6396d84 100644--- a/browser-extensions/chrome/src/contentScript/Form.ts+++ b/browser-extensions/chrome/src/contentScript/Form.ts@@ -150,6 +150,7 @@ export function injectIcon(input: HTMLInputElement): void {setTimeout(() => {icon.remove();input.removeEventListener('blur', handleBlur);+ input.removeEventListener('keydown', handleKeyPress);window.removeEventListener('scroll', updateIconPosition, true);window.removeEventListener('resize', updateIconPosition);@@ -160,7 +161,18 @@ export function injectIcon(input: HTMLInputElement): void {}, 200);};+ /**+ * Handle key press to dismiss icon.+ */+ const handleKeyPress = (e: KeyboardEvent): void => {+ // Dismiss on Enter, Escape, or Tab.+ if (e.key === 'Enter' || e.key === 'Escape' || e.key === 'Tab') {+ handleBlur();+ }+ };+input.addEventListener('blur', handleBlur);+ input.addEventListener('keydown', handleKeyPress);}/**