Comments (4)
Similarly pressing the Shift + Home or End keys should make a range selection that stop before the suffix / after the prefix.
from react-number-format.
Cursor can come before prefix or after suffix , but you can never type 0$ 0 will always will come after $ same with suffix.
@Elliot128 @mquandalle We shouldn't change the default beviour of keys as it can stop user to do expected operation (like copying the whole text inside input).
I don't think cursor position is a problem till the typed information gets corrected.
from react-number-format.
@s-yadav True, you can't actually type '0$' as the 0 gets put in the right place even if the cursor is to the left of the '$'.
However, the cursor location doesn't match the text input location in this scenarios, which makes it a big confusing.
from react-number-format.
This has been solved to a limit by enforcing cursor to be between prefix and suffix in focus, click or arrow navigation. So user will not be able to type in the middle of suffix or prefix.
But I feel the default behavior of selections should not change, because a user may want to copy whole text along with prefix and suffix.
Check 2.0.0.beta version for the fix. Closing this one.
from react-number-format.
Related Issues (20)
- 5.3.1 Regression: Typing "." leads to "^0.00" where "^" is location of caret HOT 1
- NumericFormat: customInput Antd Input is not working properly HOT 9
- Rounding with decimalScale={1} HOT 1
- IPv4 Address Mask HOT 1
- NumericFormat suffix is not allowing antdesign input to handle suffix HOT 1
- Support IME japanese keyboard HOT 2
- Not able to delete negative sign using backspace button HOT 1
- Intl.NumberFormat with fraction digits. input box <=> form state mismatch HOT 2
- percentage formatting, input box <=> form state mismatch
- Controlled Input will convert -0 to 0 HOT 2
- Problem with default value doesnt override mask, but add this value to end mask HOT 1
- Package should not throw errors when `thousandSeparator` and `decimalSeparator` are similar
- Caret moved at the end when used with Ant Design library HOT 2
- The caret position isn't set properly when I use the `removeFormatting` function to use the Persian numbers with the `thousandSeparator` prop HOT 3
- Removing last number with trailing zeros deletes all the right side zeros, when integrating with `react-hook-form` HOT 5
- TypeError: Cannot read property 'length' of undefined, js engine: hermes
- Decimal rounding up HOT 3
- Caret focus in empty place with format value HOT 3
- Type error preventing app from deploying 'No inputs were found in config file '.../node_modules/react-number-format/tsconfig.json'. HOT 2
- Why NumericFormat is not working with react-hook-form refs? HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from react-number-format.