remix-validity-state icon indicating copy to clipboard operation
remix-validity-state copied to clipboard

fix: Check for `event.preventDefault()` before setting state

Open chaance opened this issue 3 years ago • 0 comments

If a user prevents a form input's default behavior, the onChange in getInputAttrs shouldn't set state internally. To fix this I call the user's handler first, check for event.defaultPrevented and then continue with the internal event handler.

chaance avatar Sep 26 '22 23:09 chaance