MCPcopy Create free account
hub / github.com/testing-library/user-event / commitInput

Function commitInput

src/event/input.ts:230–239  ·  view source on GitHub ↗
(
  instance: Instance,
  element: EditableInputOrTextarea,
  newOffset: number,
  inputInit: InputEventInit,
)

Source from the content-addressed store, hash-verified

228}
229
230function commitInput(
231 instance: Instance,
232 element: EditableInputOrTextarea,
233 newOffset: number,
234 inputInit: InputEventInit,
235) {
236 instance.dispatchUIEvent(element, 'input', inputInit)
237
238 commitValueAfterInput(element, newOffset)
239}
240
241function isValidNumberInput(value: string) {
242 // the browser allows some invalid input but not others

Callers 1

editInputElementFunction · 0.85

Calls 1

commitValueAfterInputFunction · 0.90

Tested by

no test coverage detected