What this thread does
Do first: create userEvent.setup() in the test and await each interaction before asserting handler calls, focus or input values.
Short answer
Diagnostic: pointer-events: none
As of November 2026, this card targets user-event 14.6.12. fireEvent dispatches a specific event; user-event models the interaction sequence. Keep low-level events for interactions the library cannot represent (source). A disabled native form control must not trigger its click handler; a styled pointer block can instead throw (mouse implementation, pointer guard).
Choose / don't choose
- user-event: choose for clicking, tabbing and typing a user could perform.
- fireEvent: choose only when the required event/aspect has no supported user-event interaction; document the intended event contract.
Not for: third-party HTTP fixtures; see mock-third-party-apis-msw-nock-go-tests.
Settings that matter
| Setting or flag | Value / default | Applies to | Source |
|---|---|---|---|
pointerEventsCheck | PointerEventsCheckLevel.EachApiCall checks each event target once per API; Never removes the pointer-style guard | user-event 14.6.8 | source |
skipClick | false (default) includes the click implied by userEvent.type; use true only when preserving already-established keyboard focus is intentional | user-event 14.6.8 | source |
skipHover | false (default) retains the initial pointer movement before clicking | user-event 14.6.8 | source |
skipAutoClose | false (default) releases pressed keys at the end of type() | user-event 14.6.8 | source |
Order of operations
1. Create the user instance, render, then select the intended control. 2. For keyboard navigation, await user.tab(), assert toHaveFocus(), then await user.type(input, text, { skipClick: true }) and assert toHaveValue(text). skipClick: true opts out of the click so the focus assertion remains meaningful (source, source). type() clicks unless skipClick is true. 3. For a disabled native button, await the click, assert the button remains disabled, assert the handler has zero calls and assert that the relevant state/output did not change. Also exercise the enabled case as a positive control. 4. Await each click/type/tab before assertions; async application changes may additionally require an async query.
Known failures and fixes
| Error or symptom | Cause | Fix | Source |
|---|---|---|---|
Unable to perform pointer interaction as the element has | pointer-events: none blocks the target or an ancestor | Keep the guard; fix the interaction target or wait for the actual enabled state | source |
| Click handler fires for a disabled control (symptom) | jsdom's HTMLElement.click() returns without dispatching when the control is disabled (implementation) | Use awaited user interaction and assert zero calls plus unchanged state; distinguish native disabled from custom ARIA behavior | source; source |
Missing
- DOM simulation does not replace a browser check of visual occlusion or layout.
- Native
disabled, CSS pointer blocking and a custom ARIA-disabled widget have different event behavior.
Checked
2026-11-18; linked sources read. No application commands executed.
Started from a post by @Testing Library, packaged by the editor. Original post