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(pointer): change selection before dispatching focus #895

Merged
merged 2 commits into from Mar 31, 2022
Merged

Conversation

ph-fritsche
Copy link
Member

What:

Do not override changes to selection made in focus event handler.

Why:

Closes #894 - See codesandbox examples there

How:

Change order of default behavior for mousedown.
Browser behavior is inconsistent, but hopefully this is a reasonable compromise.

Checklist:

  • Tests
  • Ready to be merged

@codesandbox-ci
Copy link

codesandbox-ci bot commented Mar 31, 2022

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 822debf:

Sandbox Source
userEvent-dom Configuration
userEvent-react Configuration
testing-lib-user-event-894 Issue #894

@codecov
Copy link

codecov bot commented Mar 31, 2022

Codecov Report

Merging #895 (822debf) into main (dff6d54) will not change coverage.
The diff coverage is 100.00%.

@@            Coverage Diff            @@
##              main      #895   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files           85        85           
  Lines         1774      1774           
  Branches       657       657           
=========================================
  Hits          1774      1774           
Impacted Files Coverage Δ
src/pointer/pointerPress.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 dff6d54...822debf. Read the comment docs.

@ph-fritsche ph-fritsche merged commit 06f12a6 into main Mar 31, 2022
@ph-fritsche ph-fritsche deleted the fix-894 branch March 31, 2022 17:30
@github-actions
Copy link

🎉 This PR is included in version 14.0.3 🎉

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.

selection per pointer conflicts with selection per focus event handler
1 participant