diff --git a/packages/ui/src/components/sections/git-identities/GitPage.tsx b/packages/ui/src/components/sections/git-identities/GitPage.tsx index 282d4f7d..151c5119 100644 --- a/packages/ui/src/components/sections/git-identities/GitPage.tsx +++ b/packages/ui/src/components/sections/git-identities/GitPage.tsx @@ -250,6 +250,14 @@ const IdentityRow: React.FC = ({ const iconColor = COLOR_MAP[profile.color || '']; const authType = profile.authType || 'ssh'; + const handleKeyDown = (e: React.KeyboardEvent) => { + if (e.currentTarget !== e.target) return; + if (e.key !== 'Enter' && e.key !== ' ') return; + + e.preventDefault(); + onEdit(); + }; + return (
= ({ onClick={onEdit} role="button" tabIndex={0} - onKeyDown={(e) => { if (e.key === 'Enter' || e.key === ' ') onEdit(); }} + onKeyDown={handleKeyDown} >