question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Input type number: dot erases input value

See original GitHub issue

The problem described in https://github.com/erikras/redux-form/issues/1383 should be fixed since v6.1.1. But take this example: https://github.com/erikras/redux-form/issues/1383 http://redux-form.com/6.2.0/examples/syncValidation/ and try typing “1.01” for the age field.

If you digit “1”, followed by “.”, the value passed to parse is an empty string.

Testing on the latest version of Chrome, typing a “.” erases the previous input value. However I can’t find the line of code responsible for it.

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Reactions:8
  • Comments:8

github_iconTop GitHub Comments

2reactions
denengineercommented, Mar 15, 2018

Yep, problem still exists in React 16 on Chrome

2reactions
gustavohenkecommented, Dec 22, 2016

@agraver, probably not; this really seems to be internal to React. A plain <input type="number"> will work when you type 1.01. When you add plain React to this… 💣

Read more comments on GitHub >

github_iconTop Results From Across the Web

Cannot get raw value from (including dot(.)) from HTML input ...
This behavior is intentional since numeric input should only return valid numbers.
Read more >
Can't use dot/period as decimal mark for input type="number ...
So, we have 3 working solutions: - convert dot to comma when it's typed (like said in comment 1) - accept comma and...
Read more >
HTML input type number with (localized) decimal values using ...
How to fix a common issue with Chrome, IE, Edge and Opera web browsers when using the HTML5 input element with type=number using...
Read more >
HTML5 Forms: Number Type - Wufoo
The number input type is for, you guessed it, numbers: either integers or floating point numbers. Supporting browsers should display a spinner to...
Read more >
Solved: Input Number or Text without dot or commas
Solved: Hello there, I am doing an input text (number format) and I need ... the user cannot write it and in the...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found