wrolpi/app/src/hooks
lrnselfreliance 20541d7184
app: number fields no longer throw "e.preventDefault is not a function" (#735)
`useForm`'s input handlers called `e.preventDefault()` unconditionally, but the
Mantine-backed `NumberField` (Sleep between requests, Depth, Maximum Pages)
hands them a bare `{target}` object because NumberInput emits a value, not an
event.  Every keystroke in those fields threw.

`handleInputEvent` now only calls `preventDefault` when the argument actually
has one, and `getInputProps`' wrapper no longer repeats the call.  Audited every
other `preventDefault` call site: all are bound to real DOM/React events or a
guarded no-argument call.

Co-authored-by: Claude Fable 5.1 <noreply@anthropic.com>
2026-09-26 17:41:52 -06:00
..
customHooks.js app: status and settings contexts say whether their first poll landed (#734) 2026-09-26 17:25:46 -06:00
customHooks.test.js app: status and settings contexts say whether their first poll landed (#734) 2026-09-26 17:25:46 -06:00
useForm.js app: number fields no longer throw "e.preventDefault is not a function" (#735) 2026-09-26 17:41:52 -06:00
useForm.test.js app: number fields no longer throw "e.preventDefault is not a function" (#735) 2026-09-26 17:41:52 -06:00
useKeyboardShortcuts.test.js ui: Common.js and thirteen more files off Semantic 2026-08-08 18:04:00 -06:00
useLatestRequest.test.js app: useLatestRequest reports loading before the debounce (#725) 2026-09-25 14:05:08 -06:00
useOverflowNav.js ui: the corner triggers, the More button, and the search modal 2026-08-08 18:05:49 -06:00
useSubsystemToggle.test.js app: status and settings contexts say whether their first poll landed (#734) 2026-09-26 17:25:46 -06:00