Похожие чаты

Hello guys, how do you usually deal with safari being

a bitch?
Basically i have an html input with type=number. The idea is that my input element shouldn't set any non numeric value.
So things like 1.1 1. .1 are valid but alphanumerics (1.. mk $#) aren't.

I tried to set type to number, inputMode to numeric and i set the pattern attribute to a regex according to my needs, that's all working on chrome but not on safari. It seems to ignore pattern and type

I've seen people dealing with this using onkeypress and e.preventDefault() after some js logic but i am afraid that might misses something on mobiles since keycodes and keys in general don't work the same

4 ответов

19 просмотров

The leading question made me lol

I don't think they ignore the pattern. They still allow entering non-numeric input, but won't validate it.

Ghazwan-Aliesh Автор вопроса
𝙼
I don't think they ignore the pattern. They still ...

they respect pattern and type in the sense that they consider the input invalid, but they don't reject it as chrome does.

Ghazwan Aliesh
they respect pattern and type in the sense that th...

Yeah, but that's not really necessary when inputmode can hint the appropriate keyboard. Similar to say when you define a pattern for a text input that does not allow numbers, and Chrome won't reject entering digits.

Похожие вопросы

Обсуждают сегодня

а через ESC-код ?
Alexey Kulakov
29
30500 за редактор? )
Владимир
47
Anyone knows where there are some instructions or discort about failed bridge transactions ?
Jochem
21
Чёт не понял, я ж правильной функцией воспользовался чтобы вывести отладочную информацию? но что-то она не ловится
notme
18
Привет)) уже кажется эту тему перемусолили, но вот я так и не понял. Я сейчас сижу на 27дюймов 2к мониторе. На Актуальной макоси, если я куплю 27д 4к монитор: - будет ли изобр...
Vladislav Piskunov
15
Hi guys, any problem with Pulsebrige? Trying to transfer from wETH to ETH. First it tells me to connect my metamask "through mobile app" not desktop. Then I did and confirmed ...
Snowflakecrypto
13
any reference of this implementation?
BitBuddha
29
У меня есть функция где происходит это: write_bit(buffer, 1); write_bit(buffer, 0); write_bit(buffer, 1); write_bit(buffer, 1); write_bit(buffer, 1); w...
~
13
Страшнейшая правда про списки ЦБ. С первых дней жизни P2P сферы, молодые человеки, начитавшись законодательной базы и "внутренних" документов, решили, что им противостоит сер...
Foxcool
3
&"C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Tools\MSVC\14.42.34433\bin\Hostx64\x64\dumpbin.exe" /EXPORTS C:\Users\Yeet\Tauon\vcpkg\installed\x64-window...
Martin Rys
6
Карта сайта