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

InputNumber: Input Fails on Mobile Browsers #6953

Open
lulu0119 opened this issue Dec 12, 2024 · 5 comments
Open

InputNumber: Input Fails on Mobile Browsers #6953

lulu0119 opened this issue Dec 12, 2024 · 5 comments
Labels
Resolution: Cannot Replicate Issue could not be replicated by Core Team

Comments

@lulu0119
Copy link

lulu0119 commented Dec 12, 2024

Describe the bug

Environment

  • Device: Redmi Note 13
  • Browser: Chrome 131.0.6778.82
  • Operating System: Android 13

Expected behavior

On mobile devices such as Android phones, the InputNumber component does not function correctly. When attempting to input data using the mobile virtual keyboard in a web browser, the entered content is overwritten by the existing modelValue. This issue occurs because the keypress event, which was previously used to handle character insertion, is not triggered when using the mobile virtual keyboard. It's important to note that the keypress event has been deprecated and should be replaced with alternatives like beforeinput or keydown events for proper handling of text insertion on mobile platforms.

I have observed that this issue occurs on iOS Safari, Chrome, and Firefox, as well as on Android Chrome, but interestingly works as expected on Android Firefox.

Reproducer

https://stackblitz.com/edit/primevue-4-vite-issue-template-bttnao9h?file=src%2FApp.vue

PrimeVue version

4..2.4

Vue version

4.x

Language

TypeScript

Build / Runtime

Vue CLI App

Browser(s)

Chrome 131.0.6778.82

Steps to reproduce the behavior

  1. Open a web page containing an InputNumber component on an Android mobile device.
  2. Attempt to enter numbers using the virtual keyboard.
  3. Observe that the input does not effective or is immediately overwritten by the existing modelValue.

Additional Information

This issue appears to be related to internationalization. After changing the language settings of the iOS system to English and using the default keyboard, I am unable to reproduce the problem. Previously, my system language was set to 'Chinese'.
On Android devices, I can't reproduce this issue using Gboard, but the problem can be reproduced when using Chinese keyboard (such as WeChat keyboard).

Operating System Language Keyboard Issue Occurs
iOS English Default Keyboard No
iOS Chinese Default Keyboard Yes
iOS Japanese Default Keyboard Yes
iOS Russian Default Keyboard No
iOS Korean Default Keyboard No
Android English Gboard No
Android English WeChat Keyboard Yes
@lulu0119 lulu0119 added the Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible label Dec 12, 2024
@tugcekucukoglu
Copy link
Member

Thanks for the reproducer. We've tested it on different Android but cannot replicate it. How can we see the problem.

@tugcekucukoglu tugcekucukoglu added Resolution: Cannot Replicate Issue could not be replicated by Core Team and removed Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible labels Dec 12, 2024
Copy link

We're unable to replicate your issue, if you are able to create a reproducer by using PrimeVue Issue Template or add details please edit this issue. This issue will be closed if no activities in 20 days.

@lulu0119
Copy link
Author

Thanks for the reproducer. We've tested it on different Android but cannot replicate it. How can we see the problem.

trim.C63520BB-4D22-407B-B87F-4A84D3FB715A.MOV

I have reproduced it on my iOS device.

@lulu0119
Copy link
Author

This issue appears to be related to internationalization. After changing the language settings of the iOS system to English and using the default keyboard, I am unable to reproduce the problem. Previously, my system language was set to 'Chinese'.
On Android devices, I can't reproduce this issue using Gboard, but the problem can be reproduced when using Chinese keyboard (such as WeChat keyboard).

@inti7ary
Copy link

I encountered the same issue on an android device.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Resolution: Cannot Replicate Issue could not be replicated by Core Team
Projects
None yet
Development

No branches or pull requests

3 participants