Skip to content

fix(node): fire input event when clearing a text field - #336

Merged
route merged 1 commit into
mainfrom
fix/clear-input-event
Oct 15, 2026
Merged

route merged 1 commit into
mainfrom
fix/clear-input-event

Conversation

@route

@route route commented Oct 15, 2026

Copy link
Copy Markdown
Member

Fixes #164.

fill_in "field", with: "" (or node.set("")) cleared a text field with the native value setter and only fired change. The per-character input events never run for an empty string, so anything bound to input (Vue v-model, Alpine x-model, Stimulus input-> actions, live search) kept the old value.

When set leaves a previously non-empty text field empty, it now dispatches an InputEvent with inputType: "deleteContentBackward" before change, like select-all + Backspace in a browser. Setting non-empty values and clearing an already empty field fire the same events as before.

@route
route merged commit cd66dc3 into main Oct 15, 2026
7 checks passed
@route
route deleted the fix/clear-input-event branch October 15, 2026 09:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

How am I supposed to clear the <input type='text'>?

1 participant