5 ms·
Those iOS issues with type="number" are really interesting – thanks for sharing. Support for inputmode was added in iOS 12.2, but initially it used the 'numeri
by thirty6degrees 7y ago
Those iOS issues with type="number" are really interesting – thanks for sharing.
Support for inputmode was added in iOS 12.2, but initially it used the 'numeric keypad with punctuation' – is that what you mean by 'the keyboard shown varies from that for pattern='? iOS 13 updated this behaviour, so it now uses the 'correct' numeric keypad, without the punctuation keys.
The pattern attribute is still provided in order to trigger the numeric keypad on older versions of iOS. Once traffic from older iOS devices drops off we'll likely remove it.
There's a little more info here: https://github.com/alphagov/govuk-frontend/issues/1449 https://github.com/alphagov/govuk-frontend/issues/1449
(I work on the team)
- robocat 7y ago> iOS 13 updated this behaviour, so it now uses the 'correct' numeric keypad, without the punctuation keys The iPhone shows the 0-9 keyboard. The iPad shows the punctuation keyboard. This is not obvious, and one of the places where Mobile Safari acts differently between the two device types. Try jsbin.com/necuzoj
- thirty6degrees 7y agoThat is odd. However, it looks like this matches the behaviour of <input type="number"> (both trigger the punctuation keyboard).