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

Fixed #5545: Restore functionality for InputNumber on Android #5630

Closed
wants to merge 1 commit into from

Conversation

dispatchrabbi
Copy link
Contributor

This PR fixes #5545. I basically just ported over the fix in primefaces/primereact#6332, as referenced by @melloware here, though I also added tests. (Funnily enough, these were the broken tests I mentioned in my last PR.)

I hope that this gets merged swiftly and a new release is cut; at this point it's been at least 2 weeks since this component did not work for Android users, which means any site depending on it is probably broken in a pretty serious way. My own site is a writing tracker, so not being able to input numbers basically kills the whole point of the site.

Open to any feedback and suggestions here - just let me know!

Copy link

vercel bot commented Apr 22, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

2 Ignored Deployments
Name Status Preview Comments Updated (UTC)
primevue ⬜️ Ignored (Inspect) Visit Preview Apr 22, 2024 5:32pm
primevue-v4 ⬜️ Ignored (Inspect) Visit Preview Apr 22, 2024 5:32pm

Copy link
Member

@melloware melloware left a comment

Choose a reason for hiding this comment

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

Nice!

@melloware
Copy link
Member

As a note i tested this heavily with @FlipWarthog and his Android devices and so far all feedback in PrimeReact from Android users have been positive.

@dispatchrabbi
Copy link
Contributor Author

As a note i tested this heavily with @FlipWarthog and his Android devices and so far all feedback in PrimeReact from Android users have been positive.

Excellent. I also have an Android device which I tested this on, and it appears to be working well.

@FlipWarthog
Copy link
Contributor

@dispatchrabbi Can you post a screenshot of what your device shows with your fix? I tried this same fix myself, practically as you've done it, and I think there's a missing piece on the Vue side. Looks like PrimeReact uses inputMode = numeric / decimal, whereas the Vue component does not (but it can be manually added by devs: #3803) and this limits what keyboard shows.

PrimeVue, with your fix:
rn_image_picker_lib_temp_635d0a20-2190-417d-882b-80fdade9adc7

PrimeReact:
rn_image_picker_lib_temp_508f9c79-a21d-48b8-a86d-c780eacafbf5

Note, I am using a Google Pixel 6 with GBoard.

@dispatchrabbi
Copy link
Contributor Author

dispatchrabbi commented Apr 22, 2024

I did notice that the keyboard isn't numeric like in PrimeReact, but that isn't a regression in PrimeVue's case. (I checked when I noticed the discrepancy.)

Here's a screenshot on my branch:
Screenshot_20240422-141204

And here's a screenshot from commit a31f1a0c8 (which should be before the regression - note the 3.49.1 version number in the corner):
Screenshot_20240422-141240

Both are taken on my own Google Pixel 6, with GBoard, in Firefox for Android (though Google Chrome was the same).

@dispatchrabbi
Copy link
Contributor Author

Ah, I do note in your screenshot that you're on Chrome, and I also see that you've got non-numeric characters in the input. So I tested again in Chrome, and on both my branch and the pre-regression commit, the input allows non-numeric characters in Chrome, so I think that that is a bigger bug with the component (and not part of the regression).

On Firefox, it appears to correctly not allow you to input non-numeric characters, despite the keyboard.

@FlipWarthog
Copy link
Contributor

FlipWarthog commented Apr 22, 2024

Interesting, I did not check Firefox but I now see what you mean.

@dispatchrabbi
Copy link
Contributor Author

Since 1d9c036 landed, should this PR be closed?

@tugcekucukoglu
Copy link
Member

We can close. Thanks for your time!

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.

InputNumber Not Working android
4 participants