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: handle selectionRange on different input types #619

Merged
merged 4 commits into from Mar 24, 2021
Merged

Conversation

ph-fritsche
Copy link
Member

What:

Refactored how selection is applied to input elements.
Fixed how selection is handled for input elements (type="number") that don't support selection ranges.
Used fixed selection handling for {selectall}.

Why:

Closes #501 .
Required for fixing #583 .

Checklist:

  • N/A Documentation
  • Tests
  • Ready to be merged

@codecov
Copy link

codecov bot commented Mar 24, 2021

Codecov Report

Merging #619 (fa9f52a) into master (7ff9a9a) will not change coverage.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff            @@
##            master      #619   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files           47        46    -1     
  Lines          874       881    +7     
  Branches       324       330    +6     
=========================================
+ Hits           874       881    +7     
Impacted Files Coverage Δ
src/utils/edit/calculateNewValue.ts 100.00% <ø> (ø)
src/keyboard/plugins/arrow.ts 100.00% <100.00%> (ø)
src/keyboard/plugins/control.ts 100.00% <100.00%> (ø)
src/keyboard/plugins/index.ts 100.00% <100.00%> (ø)
src/keyboard/shared/fireInputEventIfNeeded.ts 100.00% <100.00%> (ø)
src/paste.ts 100.00% <100.00%> (ø)
src/type/typeImplementation.ts 100.00% <100.00%> (ø)
src/utils/edit/hasUnreliableEmptyValue.ts 100.00% <100.00%> (ø)
src/utils/edit/selectionRange.ts 100.00% <100.00%> (ø)
... and 1 more

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 7ff9a9a...fa9f52a. Read the comment docs.

@ph-fritsche ph-fritsche merged commit d5aa3ee into master Mar 24, 2021
@ph-fritsche ph-fritsche deleted the fix-501 branch March 24, 2021 19:06
@github-actions
Copy link

🎉 This PR is included in version 13.0.11 🎉

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
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Problems with custom input types
1 participant