Skip to content

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

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

issue: When creating an input that only allows numbers through a controller, entering Korean results in the last digit being erased. #11812

Closed
1 task done
kevin-sjj opened this issue Apr 23, 2024 · 2 comments

Comments

@kevin-sjj
Copy link

kevin-sjj commented Apr 23, 2024

Version Number

7.51.3

Codesandbox/Expo snack

https://codesandbox.io/p/sandbox/long-meadow-ckc5ks?layout=%257B%2522sidebarPanel%2522%253A%2522EXPLORER%2522%252C%2522rootPanelGroup%2522%253A%257B%2522direction%2522%253A%2522horizontal%2522%252C%2522contentType%2522%253A%2522UNKNOWN%2522%252C%2522type%2522%253A%2522PANEL_GROUP%2522%252C%2522id%2522%253A%2522ROOT_LAYOUT%2522%252C%2522panels%2522%253A%255B%257B%2522type%2522%253A%2522PANEL_GROUP%2522%252C%2522contentType%2522%253A%2522UNKNOWN%2522%252C%2522direction%2522%253A%2522vertical%2522%252C%2522id%2522%253A%2522clvc59r070006356paf0d7mvy%2522%252C%2522sizes%2522%253A%255B100%252C0%255D%252C%2522panels%2522%253A%255B%257B%2522type%2522%253A%2522PANEL_GROUP%2522%252C%2522contentType%2522%253A%2522EDITOR%2522%252C%2522direction%2522%253A%2522horizontal%2522%252C%2522id%2522%253A%2522EDITOR%2522%252C%2522panels%2522%253A%255B%257B%2522type%2522%253A%2522PANEL%2522%252C%2522contentType%2522%253A%2522EDITOR%2522%252C%2522id%2522%253A%2522clvc59r060002356pt6vpc78l%2522%257D%255D%257D%252C%257B%2522type%2522%253A%2522PANEL_GROUP%2522%252C%2522contentType%2522%253A%2522SHELLS%2522%252C%2522direction%2522%253A%2522horizontal%2522%252C%2522id%2522%253A%2522SHELLS%2522%252C%2522panels%2522%253A%255B%257B%2522type%2522%253A%2522PANEL%2522%252C%2522contentType%2522%253A%2522SHELLS%2522%252C%2522id%2522%253A%2522clvc59r060003356pbvoohg0j%2522%257D%255D%252C%2522sizes%2522%253A%255B100%255D%257D%255D%257D%252C%257B%2522type%2522%253A%2522PANEL_GROUP%2522%252C%2522contentType%2522%253A%2522DEVTOOLS%2522%252C%2522direction%2522%253A%2522vertical%2522%252C%2522id%2522%253A%2522DEVTOOLS%2522%252C%2522panels%2522%253A%255B%257B%2522type%2522%253A%2522PANEL%2522%252C%2522contentType%2522%253A%2522DEVTOOLS%2522%252C%2522id%2522%253A%2522clvc59r060005356pxbedg4nq%2522%257D%255D%252C%2522sizes%2522%253A%255B100%255D%257D%255D%252C%2522sizes%2522%253A%255B50%252C50%255D%257D%252C%2522tabbedPanels%2522%253A%257B%2522clvc59r060002356pt6vpc78l%2522%253A%257B%2522tabs%2522%253A%255B%257B%2522id%2522%253A%2522clvc59r060001356p04771qrb%2522%252C%2522mode%2522%253A%2522permanent%2522%252C%2522type%2522%253A%2522FILE%2522%252C%2522filepath%2522%253A%2522%252Fsrc%252Findex.tsx%2522%252C%2522state%2522%253A%2522IDLE%2522%257D%252C%257B%2522id%2522%253A%2522clvc5ck2e003a356orsaxobet%2522%252C%2522mode%2522%253A%2522permanent%2522%252C%2522type%2522%253A%2522FILE%2522%252C%2522initialSelections%2522%253A%255B%257B%2522startLineNumber%2522%253A19%252C%2522startColumn%2522%253A15%252C%2522endLineNumber%2522%253A19%252C%2522endColumn%2522%253A15%257D%255D%252C%2522filepath%2522%253A%2522%252Fsrc%252FApp.tsx%2522%252C%2522state%2522%253A%2522IDLE%2522%257D%255D%252C%2522id%2522%253A%2522clvc59r060002356pt6vpc78l%2522%252C%2522activeTabId%2522%253A%2522clvc5ck2e003a356orsaxobet%2522%257D%252C%2522clvc59r060005356pxbedg4nq%2522%253A%257B%2522tabs%2522%253A%255B%257B%2522id%2522%253A%2522clvc59r060004356p5v3edq4l%2522%252C%2522mode%2522%253A%2522permanent%2522%252C%2522type%2522%253A%2522UNASSIGNED_PORT%2522%252C%2522port%2522%253A0%252C%2522path%2522%253A%2522%252F%2522%257D%255D%252C%2522id%2522%253A%2522clvc59r060005356pxbedg4nq%2522%252C%2522activeTabId%2522%253A%2522clvc59r060004356p5v3edq4l%2522%257D%252C%2522clvc59r060003356pbvoohg0j%2522%253A%257B%2522tabs%2522%253A%255B%255D%252C%2522id%2522%253A%2522clvc59r060003356pbvoohg0j%2522%257D%257D%252C%2522showDevtools%2522%253Atrue%252C%2522showShells%2522%253Afalse%252C%2522showSidebar%2522%253Atrue%252C%2522sidebarPanelSize%2522%253A15%257D

Steps to reproduce

  1. Go to CodeSandBox Link.
  2. Type digit Numbers Like 18592836
  3. Type Korean Character ㅁㅁㅁㅁㅁㅁ...
  4. last digit character being removed one by one

Expected behaviour

  • digit character should not be removed
  • only non-digit characters replaced by regex by field.onChange(event.target.value.replace(/\D/g, ''))

What browsers are you seeing the problem on?

Chrome

Relevant log output

No response

Code of Conduct

  • I agree to follow this project's Code of Conduct
@kevin-sjj
Copy link
Author

It seems there is an issue occurring when inputting CJK characters, which doesn't happen when inputting English alphabet characters.

@kevin-sjj kevin-sjj changed the title issue: only digit text allowed text input removes last digit character when type korean issue: When creating an input that only allows numbers through a controller, entering Korean results in the last digit being erased. Apr 23, 2024
@kevin-sjj
Copy link
Author

I used the Windows operating system, and the version of Chrome was 123.0.6312.124.

@react-hook-form react-hook-form locked and limited conversation to collaborators May 5, 2024
@bluebill1049 bluebill1049 converted this issue into discussion #11862 May 5, 2024

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant