-
Notifications
You must be signed in to change notification settings - Fork 251
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: keep track of document state in UI #747
Conversation
This pull request is automatically built and testable in CodeSandbox. To see build info of the built libraries, click here or the icon next to each commit SHA. Latest deployment of this branch, based on commit c6fa093:
|
Codecov Report
@@ Coverage Diff @@
## userEvent14 #747 +/- ##
=============================================
Coverage 100.00% 100.00%
=============================================
Files 50 54 +4
Lines 965 1048 +83
Branches 389 413 +24
=============================================
+ Hits 965 1048 +83
Continue to review full report at Codecov.
|
* feat: keep track of document state in UI * programmatically changing value resets UIValue * prevent stacking of value interceptors * programmatically changing value resets initial value * fix istanbul ignore see kentcdodds/kcd-scripts#218 * ignore uncovered `activeElement` being `null` * intercept calls to `setSelectionRange` * fix istanbul ignore see kentcdodds/kcd-scripts#218 * ignore omitting unnecessary event * remove obsolete util * move modules * fix istanbul ignore see kentcdodds/kcd-scripts#218 * ignore omitting unnecessary event
* feat: keep track of document state in UI * programmatically changing value resets UIValue * prevent stacking of value interceptors * programmatically changing value resets initial value * fix istanbul ignore see kentcdodds/kcd-scripts#218 * ignore uncovered `activeElement` being `null` * intercept calls to `setSelectionRange` * fix istanbul ignore see kentcdodds/kcd-scripts#218 * ignore omitting unnecessary event * remove obsolete util * move modules * fix istanbul ignore see kentcdodds/kcd-scripts#218 * ignore omitting unnecessary event
* programmatically changing value resets UIValue * prevent stacking of value interceptors * programmatically changing value resets initial value * intercept calls to `setSelectionRange`
What:
Centralize workarounds for document state in UI diverging from the document state available per API.
Why:
Closes #744
How:
Combine previous workarounds in one place.
Apply workaround per
focus
andblur
events.Intercept programmatically set values by event handlers and keep track of own manipulations of displayed values that might not translate to an equal
value
property.Intercept calls to
setSelectionRange
and keep track of selections in UI diverging from theselectionStart
/selectionEnd
properties.Checklist: