-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
InputNumber: Cannot input numbers in AZERTY layout #5508
InputNumber: Cannot input numbers in AZERTY layout #5508
Comments
From my tests, it looks like the bug got introduced in Precisely, I have the feeling that the bug appeared with this commit: ec04c03 |
I confirm this issue, having it as well, only on AZERTY layouts. |
This was fixed in PrimeReact: primefaces/primereact#6258 |
Great, so it seems it should be easy to fix for PrimeVue as well? If that's the case, are you able to merge the fix for 3.52.0 milestone https://github.com/primefaces/primevue/milestone/178, as I had to rollback to 3.49.1 to get it to work on my app. Thank you. |
@arlai-mk yes let me submit a PR |
Fix #5508: InputNumber allow AZERTY keyboards
Describe the bug
When typing in an
InputNumber
in AZERTY layout, no number can be set, andundefined
is in fact set in the component.I'm on MacOS, but not sure it's the issue here, I think the browser abstract away this detail.
Reproducer
https://primevue.org/inputnumber/
PrimeVue version
3.50.0
Vue version
3.x
Language
TypeScript
Build / Runtime
Vue CLI App
Browser(s)
ALL (checked on Chrome and Safari)
Steps to reproduce the behavior
undefined
.In the video you can see the keys I'm pressing in both
InputNumber
andInputText
, they're the same and should produce2020
PrimeVue.-.InputNumber.AZERTY.bug.mov
Expected behavior
A number is inputed.
From my quick diving in the code, the issue is with this lines in the
onInputKeyDown
event:So if a
Shift
key is pressed, the event handler does an early return. Unfortunately, on an AZERTY layout, one must do a combination ofShift
+number-key to input a number.The text was updated successfully, but these errors were encountered: