primevue icon indicating copy to clipboard operation
primevue copied to clipboard

Fixed #5545: Restore functionality for InputNumber on Android

Open dispatchrabbi opened this issue 10 months ago • 8 comments

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!

dispatchrabbi avatar Apr 22 '24 17:04 dispatchrabbi

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

vercel[bot] avatar Apr 22 '24 17:04 vercel[bot]

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.

melloware avatar Apr 22 '24 17:04 melloware

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 avatar Apr 22 '24 17:04 dispatchrabbi

@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.

FlipWarthog avatar Apr 22 '24 17:04 FlipWarthog

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 avatar Apr 22 '24 18:04 dispatchrabbi

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.

dispatchrabbi avatar Apr 22 '24 18:04 dispatchrabbi

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

FlipWarthog avatar Apr 22 '24 18:04 FlipWarthog

Since https://github.com/primefaces/primevue/commit/1d9c036f31a9923f63406a77f7c280195ab34310 landed, should this PR be closed?

dispatchrabbi avatar Apr 27 '24 15:04 dispatchrabbi

We can close. Thanks for your time!

tugcekucukoglu avatar Jun 10 '24 06:06 tugcekucukoglu