You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Before I start, I want to point out that those changes impact me while using my CMS on mobile (iOS 16). On web it wouldn't matter due to the keyboard usage.
I have a bunch of schemas containing number fields.
In v2, a number field renders an input type text (which, let's be honest, isn't the best option semantic for an input):
Latest Sanity v2
On mobile, when I focus on this field, it opens the keyboard with letters, numbers, and symbols. Far from optimal, but I still could find the decimal symbols and fill those numbers out.
When I clone my CMS using Sanity v3, I notice that the same field now renders in type number (great), however, it has a mode called numeric:
And that's not right for a number field.
That's because, according to MDN:
"Numeric" input keyboard, but only requires the digits 0–9. Devices may or may not show a minus key.
I think you can guess that now using Sanity v3 when I open on mobile, it only opens the numeric keyboard, and I cannot type decimals:
That's really hard because every time I have to type something on mobile, I have to do it wrong, open it on my PC and fix those values.
To Reproduce
creates a sanity project using v3;
defines a schema with a field type number;
run the server;
open sanity desk on your mobile (I tried on iOS, but I believe it would also affect android. Emulator might work also);
See the numeric field
Expected behavior
I expect when I define a numeric field, it uses inputmode="decimal" so the right keyboard layout could be invoked.
This thread has been automatically locked because it has not had recent activity. Please open a new issue for related bugs and link to relevant comments in this thread.
Describe the bug
I have a bunch of schemas containing
number
fields.In v2, a
number
field renders an input typetext
(which, let's be honest, isn't the best option semantic for an input):Latest Sanity v2
On mobile, when I focus on this field, it opens the keyboard with letters, numbers, and symbols. Far from optimal, but I still could find the decimal symbols and fill those numbers out.
When I clone my CMS using Sanity v3, I notice that the same field now renders in type
number
(great), however, it has a mode callednumeric
:And that's not right for a number field.
That's because, according to MDN:
I think you can guess that now using Sanity v3 when I open on mobile, it only opens the numeric keyboard, and I cannot type decimals:
That's really hard because every time I have to type something on mobile, I have to do it wrong, open it on my PC and fix those values.
To Reproduce
Expected behavior
I expect when I define a
numeric
field, it usesinputmode="decimal"
so the right keyboard layout could be invoked.Screenshots
On the problem description
Which versions of Sanity are you using?
On my v3 project:
On my v2 project:
What operating system are you using?
iOS 16
Which versions of Node.js / npm are you running?
Additional context
The text was updated successfully, but these errors were encountered: