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

InputOtp keydown bug for integerOnly #17392

Open
balazsmeszegeto opened this issue Jan 14, 2025 · 0 comments · May be fixed by #17393
Open

InputOtp keydown bug for integerOnly #17392

balazsmeszegeto opened this issue Jan 14, 2025 · 0 comments · May be fixed by #17393
Labels
Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible

Comments

@balazsmeszegeto
Copy link

balazsmeszegeto commented Jan 14, 2025

Describe the bug

KeyboardEvent.code ignores keyboard layout:
Image
https://developer.mozilla.org/en-US/docs/Web/API/Element/keyup_event#browser_compatibility

In many keyboard layouts, number are on keys, where on English keyboard are not numbers, thus event.code.startsWith('Digit') will return false. This has been issues in sister-repos, ie: primefaces/primereact#6727

Pull Request Link

#17393

Other Reason

No response

Reproducer

https://primeng.org/inputotp

Environment

Keyboard layout with different numbers, for example Hungarian

Angular version

19.0.6

PrimeNG version

v19, v18, v17

Node version

No response

Browser(s)

No response

Steps to reproduce the behavior

Set integerOnly flag to true. Try using numbers on a non-English keyboard layout. Numbers might be prevented

Expected behavior

Should display numbers.

@balazsmeszegeto balazsmeszegeto added the Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible label Jan 14, 2025
balazsmeszegeto added a commit to balazsmeszegeto/primeng that referenced this issue Jan 14, 2025
balazsmeszegeto added a commit to balazsmeszegeto/primeng that referenced this issue Jan 14, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant