You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The state of the document which the user sees and interacts with in the browser is not always reflected by the properties and methods on the document. (Displayed value diverging from value property; selection on elements without support for selectionStart/selectionEnd)
Also some behavior in the browser depends on circumstances before our interaction with the document in a userEvent.* call . (If a change event is fired on blur depends on the initial value when the element gained focus. But the value can change between gaining focus and the userEvent.* call.)
See #714
the IDL value attribute does not reflect the input value.
*/
carryValue?: string
Todo:
Collect our workarounds for UI document state diverging from API document state at one place in our codebase
Provide one entry point to prepare the document with our workarounds
Attaching event handlers to the capture phase of focus and blur seems like a good start to intercept information that is otherwise lost for us.
We probably should replace the implementations of setSelectionRange and Selection so that we can intercept programmatic changes by event handlers and at the same time apply the "visible" selection as we calculated it.
Provide an internal API used by all our implementations to get or set values or selections.
The text was updated successfully, but these errors were encountered:
The state of the document which the user sees and interacts with in the browser is not always reflected by the properties and methods on the document. (Displayed value diverging from
value
property; selection on elements without support forselectionStart
/selectionEnd
)Also some behavior in the browser depends on circumstances before our interaction with the document in a
userEvent.*
call . (If achange
event is fired onblur
depends on the initial value when the element gained focus. But the value can change between gainingfocus
and theuserEvent.*
call.)See #714
We've applied workarounds for this here:
user-event/src/keyboard/types.ts
Lines 27 to 32 in 2f900ef
Todo:
Attaching event handlers to the capture phase of
focus
andblur
seems like a good start to intercept information that is otherwise lost for us.We probably should replace the implementations of
setSelectionRange
andSelection
so that we can intercept programmatic changes by event handlers and at the same time apply the "visible" selection as we calculated it.The text was updated successfully, but these errors were encountered: