Input type number firefox не работает

Input type number firefox не работает

Поиск в Поддержке

Избегайте мошенников, выдающих себя за службу поддержки. Мы никогда не попросим вас позвонить, отправить текстовое сообщение или поделиться личной информацией. Сообщайте о подозрительной активности, используя функцию «Пожаловаться».

Learn More

works buggy

  • 5 ответов
  • 4 имеют эту проблему
  • 199 просмотров
  • Последний ответ от jscher2000

When I click on it and try to enter something — it ignore input. But when I click little up or down buttons on its right side it increment/decrement value. When I query value it return CHANGED value.

Выбранное решение

Bug was reported by numerous people, will be fixed in Firefox 30. See: Bug # 982189 – Readonly input type=»number» can still be changed through arrows.

Все ответы (5)

I’m not quite sure what you’re trying to do: are you trying to display a number in an input field which cannot be edited no matter what?

Thanks for the clarification!

Изменено 2 июня 2014 г., 08:32:25 -0700 Epicaleb

Form have sereral inputs, selects and textarea. Some of them marked readonly. All works fine except type=number. User can change value indirectly. It is a bug isn`t it? Or may be I misunderstand something?

Hmmm. unfortunately, there seems to be no straight-out way to prevent user input to the number field; there are a couple of options, though:

This style will hide the spinner buttons in Firefox: input[type=number] <

This option will change the value of the field right back to what it was before the user tried to change it.

Источник

Номер типа ввода HTML5 не работает в firefox

я использую HTML5 input type=number . Он отлично работает в браузере Chrome, но не работает в Firefox и IE9.

Я хочу увеличить количество one то есть step=1 и я поставил min=1 .

Читайте также:  Состояние не хочу работать

я использую следующий код:

есть ли патч или хак, чтобы заставить его работать в Firefox и IE9. Или же, что может быть возможным решением для этого.

6 ответов

Примечание: атрибут min тега не поддерживается в Internet Explorer 9 и более ранних версиях или в Firefox.

Примечание: атрибут min не будет работать для дат и времени в Internet Explorer 10, так как IE 10 не поддерживает эти типы ввода.

Он не поддерживается в firefox или internet explorer, за исключением версии 11, которая имеет частичную поддержку. См.эта матрица сравнения.

можно использовать номер polyfill прокладка для получения поддержки неподдерживаемых браузеров.

тип number еще не поддерживается в Firefox или IE9 (почти в IE10), поэтому он вернется к типу ввода text .

на самом деле нет необходимости в «исправлении или взломе» — обычное поле ввода будет работать нормально. Вот почему он возвращается в текстовое поле. Независимо от того, отображается ли оно в качестве фактического числового поля для конечного пользователя, это просто бонус чтобы сделать его немного более удобным. Ты все еще должен выполняйте серверные проверки любого значения, отправленного вам, поэтому, позволяя пользователю просто ввести номер, когда их браузер не поддерживает тип номера, ничего не должно повредить.

кроме того, вы можете использовать текстовое поле с

Это не поддерживается.

вы можете использовать javascript для того же результата, если вам это действительно нужно.

Я использую firefox, у меня была такая же проблема с разработкой моего номера типа ввода, набрав карактеры и пробелы и т. д. во всяком случае, я использую angular 2 в этих примерах, его почти похож на javascript, поэтому вы можете использовать этот код в каждом случае : вот html:

вот функция FilterInput:

в этой функции я должен был просто позволить нажатию клавиш чисел, направление, удаляет enter.

Источник

Input type number firefox не работает

Search Support

Avoid support scams. We will never ask you to call or text a phone number or share personal information. Please report suspicious activity using the “Report Abuse” option.

Learn More

works buggy

  • 5 replies
  • 4 have this problem
  • 199 views
  • Last reply by jscher2000

When I click on it and try to enter something — it ignore input. But when I click little up or down buttons on its right side it increment/decrement value. When I query value it return CHANGED value.

Читайте также:  Вольво хс90 память сидений как настроить

Chosen solution

Bug was reported by numerous people, will be fixed in Firefox 30. See: Bug # 982189 – Readonly input type=»number» can still be changed through arrows.

All Replies (5)

I’m not quite sure what you’re trying to do: are you trying to display a number in an input field which cannot be edited no matter what?

Thanks for the clarification!

Modified June 2, 2014 at 8:32:25 AM PDT by Epicaleb

Form have sereral inputs, selects and textarea. Some of them marked readonly. All works fine except type=number. User can change value indirectly. It is a bug isn`t it? Or may be I misunderstand something?

Hmmm. unfortunately, there seems to be no straight-out way to prevent user input to the number field; there are a couple of options, though:

This style will hide the spinner buttons in Firefox: input[type=number] <

This option will change the value of the field right back to what it was before the user tried to change it.

Источник

HTML5 input type number not working in firefox

I am using HTML5 input type=number . Its working perfectly in Chrome browser, but its not working in Firefox and IE9.

I want to increment the quantity by one i.e. step=1 and also I have set min=1 .

I am using the following code:

Is there any patch or hack to make it work in Firefox and IE9. Or else, what could be the possible solution for that.

8 Answers 8

It is not supported in firefox or internet explorer, except for version 11 which has partial support. See this comparison matrix.

You can use the number polyfill shim to get support for unsupported browsers.

Alternately, you can use a textfield with a pattern=»» attribute. Although it doesn’t have the up and down buttons, it does validate for having the correct values:

You can alter the pattern to your quantity wishes, it is now set for a value ranging from 1 to 9. Also you can add up/down buttons with JS/jQuery that have hotkeys bound to them for a more number-field-like feel.

Читайте также:  Почему планшет не работает с гугл плей

The input type number is not supported yet in Firefox or IE9 (almost in IE10), so it will revert to input type text .

There’s really no need for a «patch or hack» — a regular input field will work just fine. That’s why it reverts to a text field. Whether or not it displays as an actual number field to the end-user is just a bonus to make it slightly more convenient. You should still be doing server-side checks on whatever value is sent to you, so allowing a user to just type in a number when their browser doesn’t support the number type shouldn’t harm anything.

Источник

Input type number is not working in firefox

I have an issue.I have an input field which type is number but its taking any alphabet in mozila firefox browser.Its working great in chrome but not working in firefox.I need it should work as chrome and not take any alphabet.I am using Mozila firefox version 48.0.I am explaining my code below.

2 Answers 2

i am using firefox too, i had the same issue developing my input type number typing caracters and spaces etc. i have found the solution of the tag pattern=»8″, but unfortunately it didn’t work for me. After a wile of searching without any result, i decided to develop my own function. anyway i m using angular 2 in this examples, its almost similar to javascript, so you can use this code in every case : here is the html :

here is the function FilterInput :

in this function i had to just let the keypress of numbers, direction, deletes enter.

Note: The min attribute of the tag is not supported in Internet Explorer 9 and earlier versions, or in Firefox.

Hot Network Questions

Subscribe to RSS

To subscribe to this RSS feed, copy and paste this URL into your RSS reader.

site design / logo © 2021 Stack Exchange Inc; user contributions licensed under cc by-sa. rev 2021.10.19.40495

By clicking “Accept all cookies”, you agree Stack Exchange can store cookies on your device and disclose information in accordance with our Cookie Policy.

Источник

Оцените статью