-
Notifications
You must be signed in to change notification settings - Fork 252
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: rewrite selection handling #776
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 5caa381:
|
Codecov Report
@@ Coverage Diff @@
## alpha #776 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 64 64
Lines 1320 1384 +64
Branches 507 544 +37
=========================================
+ Hits 1320 1384 +64
Continue to review full report at Codecov.
|
🎉 This PR is included in version 14.0.0-alpha.7 🎉 The release is available on: Your semantic-release bot 📦🚀 |
Rewrite the selection utility and refactor how user (character) input is applied. * rewrite selection handling * update selection when moving focus
What:
Rewrite how selection ranges / cursor position is handled.
Why:
Previous implementation did not support selection with backward direction, multiple ranges or ranges spanning over different element or ranges including non-character elements.
It also didn't interact with the
Selection
API.How:
Implement selection utilities on top of
Selection
.Mimick browser implementation on input elements that have their own UI selection independent from
Selection
and without programmatic interface.I removed multi-range implementation for now as it is not available across all major browsers and neither in Jsdom.
Checklist: