Skip to content
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

fix: reset UI selection on setter #770

Merged
merged 2 commits into from
Oct 30, 2021
Merged

fix: reset UI selection on setter #770

merged 2 commits into from
Oct 30, 2021

Conversation

ph-fritsche
Copy link
Member

@ph-fritsche ph-fritsche commented Oct 29, 2021

What:

Reset our "UI" selection when the selection is programmatically changed.

Why:

Selection can be set programmatically per properties as well as per setSelectionRange.

Might help resolving #758

How:

Intercept selectionStart/selectionEnd setter.

Checklist:

  • Tests
  • Ready to be merged

@codesandbox-ci
Copy link

codesandbox-ci bot commented Oct 29, 2021

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 36241fe:

Sandbox Source
userEvent-PR-template Configuration

@codecov
Copy link

codecov bot commented Oct 29, 2021

Codecov Report

Merging #770 (36241fe) into alpha (4f04a3d) will not change coverage.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff            @@
##             alpha      #770   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files           64        64           
  Lines         1304      1312    +8     
  Branches       505       505           
=========================================
+ Hits          1304      1312    +8     
Impacted Files Coverage Δ
src/document/selection.ts 100.00% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 4f04a3d...36241fe. Read the comment docs.

@ph-fritsche ph-fritsche merged commit 07bf49b into alpha Oct 30, 2021
@ph-fritsche ph-fritsche deleted the fix-reactcontrolled branch October 30, 2021 20:19
@github-actions
Copy link

🎉 This PR is included in version 14.0.0-alpha.5 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant