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: change event should provider correct selection data #65

Merged
merged 2 commits into from
Mar 11, 2024

Conversation

zombieJ
Copy link
Member

@zombieJ zombieJ commented Mar 11, 2024

Copy link

codecov bot commented Mar 11, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 97.38%. Comparing base (e643b06) to head (a0ced8e).

Additional details and impacted files
@@            Coverage Diff             @@
##           master      #65      +/-   ##
==========================================
+ Coverage   97.34%   97.38%   +0.04%     
==========================================
  Files           5        5              
  Lines         188      191       +3     
  Branches       69       69              
==========================================
+ Hits          183      186       +3     
  Misses          5        5              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@afc163
Copy link
Member

afc163 commented Mar 11, 2024

ant-design/ant-design#46999 也能一起解决么?

@zombieJ zombieJ merged commit 9610401 into master Mar 11, 2024
9 checks passed
@delete-merged-branch delete-merged-branch bot deleted the fix-selection branch March 11, 2024 03:45

// Fill data
currentTarget.value = value;
currentTarget.selectionStart = target.selectionStart;

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This line causes error for Input component when it's type is email.

<Input type="email />

InvalidStateError: Failed to set the 'selectionStart' property on 'HTMLInputElement': The input element's type ('email') does not support selection.

@C3maLi
Copy link

C3maLi commented Mar 17, 2024

ant-design/ant-design#46999 也能一起解决么?

The problem still persists, I am testing with the latest versions but the problem persists.

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

Successfully merging this pull request may close these issues.

TextArea: selectionEnd always 0
4 participants