Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Controlled inputs with type="number" do not work in some browsers #3810

Closed
piratus opened this issue May 4, 2015 · 4 comments
Closed

Controlled inputs with type="number" do not work in some browsers #3810

piratus opened this issue May 4, 2015 · 4 comments

Comments

@piratus
Copy link

piratus commented May 4, 2015

Controlled inputs in current Safari, Firefox and Chrome let you input anything as if they were not controlled. They do work as supposed in IE9 and Chrome Dev build. I don't have IE 10 or 11 to test those.

Here is a sample JSBin that reproduces the problem: http://jsbin.com/yahitu/1/edit?js,output

@b2whats
Copy link

b2whats commented May 4, 2015

Все нормально работает, как и должно

@muromec
Copy link

muromec commented May 4, 2015

More detailed info: when <input type="number" /> component receives string as value property it silently ignores it and behaves like uncontrolled one.

Above example works as intended when you change default value to NaN.

@piratus piratus changed the title Controlled components do not work in some browsers Controlled inputs with type="number" do not work in some browsers May 4, 2015
@waldreiter
Copy link
Contributor

More discussion about this is in #1549.

@zpao
Copy link
Member

zpao commented May 5, 2015

Thanks for finding that @cody. I'm going to close this out and we can continue discussion over there.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants