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: fix safari abnormal behavior #54

Merged
merged 1 commit into from
Dec 8, 2023

Conversation

yyz945947732
Copy link
Contributor

ant-design/ant-design#46200

修复 safari 浏览器输入中文会导致拼音字母也显示在输入框内的问题。

@afc163 afc163 merged commit c3793b3 into react-component:master Dec 8, 2023
7 checks passed
@@ -53,13 +53,15 @@ export function resolveOnChange<

// Trigger by composition event, this means we need force change the input value
if (targetValue !== undefined) {
const currentTarget = target.cloneNode(true) as E;
Copy link
Member

Choose a reason for hiding this comment

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

备注一下 issue 会更好

@C3maLi
Copy link

C3maLi commented Mar 9, 2024

After this development is made, the problem issue arises.
Since cloneNode is used, it always returns selectionStart and selectionEnd = 0, so react-number-format cannot position it in the right place.

@yyz945947732
Is there a recent improvement for this?

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.

4 participants