Problem
Sometimes while I am typing in an input field, a background refresh/poll resets the field contents. This wipes out what I was writing and is a bad UX.
Expected
If a field is focused, background updates must never overwrite its value.
Fix direction
- Any periodic state refresh that touches input values should check
document.activeElement (or equivalent) and skip the update for focused fields.
- Alternatively, treat the input as uncontrolled while focused, reconciling only on blur.
Acceptance criteria
Problem
Sometimes while I am typing in an input field, a background refresh/poll resets the field contents. This wipes out what I was writing and is a bad UX.
Expected
If a field is focused, background updates must never overwrite its value.
Fix direction
document.activeElement(or equivalent) and skip the update for focused fields.Acceptance criteria