Ignore a keydown that carries no key #359

Closed
opened 2026-09-15 14:27:10 +00:00 by jcoffey-dev · 0 comments
Owner

Picking a saved login from Chrome's password autofill fires a plain Event("keydown") with no key. The global shortcut listener passed it to comboOf, which read key.length and threw TypeError: Cannot read properties of undefined (reading 'length'). The result was an uncaught console error on every sign-in. Nothing broke, but it looks like a real fault.

comboOf now returns null when there is no key, the same as it already does for a bare modifier.

Checked

  • Reproduced in Chrome against the mock by dispatching new Event("keydown"). It throws on main and not with this change, after a full reload.
  • g c still navigates, so real shortcuts are unaffected.
  • New keyboardKeyless.test.ts: its two no-key tests fail on main and pass here. It also checks that ordinary keys still map as before.
  • Typecheck, 1221 tests and build pass.

No new strings, so no translation work.

Merged 2026-09-15 as coffey-labs/ihasmail@bb8d6eb92d

Rebuilt from: GH Archive, git history, session transcript.

Picking a saved login from Chrome's password autofill fires a plain `Event("keydown")` with no `key`. The global shortcut listener passed it to `comboOf`, which read `key.length` and threw `TypeError: Cannot read properties of undefined (reading 'length')`. The result was an uncaught console error on every sign-in. Nothing broke, but it looks like a real fault. `comboOf` now returns `null` when there is no key, the same as it already does for a bare modifier. **Checked** - Reproduced in Chrome against the mock by dispatching `new Event("keydown")`. It throws on `main` and not with this change, after a full reload. - `g c` still navigates, so real shortcuts are unaffected. - New `keyboardKeyless.test.ts`: its two no-key tests fail on `main` and pass here. It also checks that ordinary keys still map as before. - Typecheck, 1221 tests and build pass. No new strings, so no translation work. **Merged** 2026-09-15 as coffey-labs/ihasmail@bb8d6eb92dce <sub>Rebuilt from: GH Archive, git history, session transcript.</sub>
This repo is archived. You cannot comment on issues.