primevue
primevue copied to clipboard
Fixed #5545: Restore functionality for InputNumber on Android
This PR fixes #5545. I basically just ported over the fix in https://github.com/primefaces/primereact/pull/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!
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 |
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.
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.
@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:
PrimeReact:
Note, I am using a Google Pixel 6 with GBoard.
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:
And here's a screenshot from commit a31f1a0c8
(which should be before the regression - note the 3.49.1 version number in the corner):
Both are taken on my own Google Pixel 6, with GBoard, in Firefox for Android (though Google Chrome was the same).
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.
Interesting, I did not check Firefox but I now see what you mean.
Since https://github.com/primefaces/primevue/commit/1d9c036f31a9923f63406a77f7c280195ab34310 landed, should this PR be closed?
We can close. Thanks for your time!