Fix AbstractCombobox.onInput() never firing on native input events - #672
Merged
fpigeonjr merged 1 commit intoSep 1, 2026
Merged
Conversation
There was a problem hiding this comment.
Pull request overview
Fixes AbstractCombobox.onInput() so registered callbacks receive native input events.
Changes:
- Dispatches
"input"alongside existing"search"events. - Adds regression coverage for
onInput().
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
abstract-combobox.ts |
Dispatches registered input callbacks. |
abstract-combobox.spec.ts |
Verifies native input event handling. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
fpigeonjr
marked this pull request as ready for review
September 1, 2026 17:33
fpigeonjr
marked this pull request as draft
September 1, 2026 17:38
The native input listener in _setupInputEvents only dispatched the "search" event, so any onInput(cb, ctx) registration was a dead callback despite "input" being a registered event name in _initEventDispatcher. Dispatch "input" alongside "search" from the same native input listener so onInput callbacks actually fire, and add a regression spec mirroring the existing onSearch coverage. Closes #659
fpigeonjr
force-pushed
the
gh-659-abstractcombobox-oninput-is-a-public-no-op-input-e
branch
from
September 1, 2026 18:33
fd98db7 to
b5abb25
Compare
fpigeonjr
marked this pull request as ready for review
September 1, 2026 18:57
beverly-n
approved these changes
Sep 1, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
AbstractCombobox(src/ui-kit/experimental/aria/abstract-combobox/abstract-combobox.ts) declares a publiconInput(callback, context)method and registers"input"as a valid event name in_initEventDispatcher, but nothing in the class ever dispatched that event — the nativeinputDOM listener in_setupInputEventsonly dispatched"search". Any consumer callingcombobox.onInput(cb, ctx)registered a callback that was never invoked.Fixed by dispatching
"input"alongside"search"from the same nativeinputlistener, soonInputcallbacks now fire without changing existing"search"behavior (whichsam-picker'sonSearchoutput and its spec depend on).Added a regression spec (
abstract-combobox.spec.ts) mirroring the existingonSearchcoverage, confirmingonInputcallbacks are invoked when the input fires a nativeinputevent.A Playwright/e2e test was intentionally not added — this is a pure event-wiring bug (jsdom's synthetic
inputdispatch behaves identically to a real browser here), not a CSS-cascade or real-pointer hit-testing issue, so perAGENTS.md's Vitest/Playwright boundary guidance a Vitest spec is sufficient to catch and pin this regression.Motivation and Context
Closes #659
Type of Change (Select One and Apply Label)
bugfixlabelenhancementlabelbreakinglabelmaintenancelabelHow to Test
npm ci && npm ci --prefix test-appcd test-app && npx vitest run --config vitest.config.mts abstract-combobox— confirm the new "dispatches an input event whenever the input fires a native input event" spec passes, alongside the existingonSearchspec.npm --prefix test-app test— confirm the full suite (151 files / 1378 tests) still passes.Expected result:
onInput(cb, ctx)callbacks registered onAbstractComboboxfire when the underlying input fires a nativeinputevent;onSearchcontinues to fire as before.Screenshots (if appropriate)
N/A — backend/logic change only, no UI changes.
Checklist
gh-<number>-<slug>)format:checkpasses (npm run format:check)lintpasses (npm run lint)buildpasses (cd test-app && npm run build)cd test-app && npm test)Note on coverage gate:
npm run coverage:checkcurrently fails on this branch, but this failure pre-exists onmaster(verified against a clean clone atdb5cc25b, the currentmasterHEAD, and confirmed by the two most recentmasterCI runs both failing on the same gate) — unrelated to this change. This PR's coverage is measured slightly higher thanmaster's (88.58% vs 88.57% statements) due to the added spec.