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

Cursor position when deleting last number before seperator #116

Open
ghost opened this issue May 6, 2021 · 0 comments
Open

Cursor position when deleting last number before seperator #116

ghost opened this issue May 6, 2021 · 0 comments

Comments

@ghost
Copy link

ghost commented May 6, 2021

Hey guys,

We are using rifm for input fields where the value of the input should be a number with a two digit fractional part

We're having some issues when deleting the last number before the decimal seperator.

The issue:
Let's assume the value of the field to be |5.23 and the cursor position is marked as '|'
If the user press delete the input field will display |0.23
If the user now press a number i.e. 6 the field will display 6|0.23

This is an issue because the user will assume that the field display 6|.23 and not 6|0.23

You can reproduce the behaivor in rifm's demo sandbox. I also made an isolated sandbox here:
https://codesandbox.io/s/async-hill-r1hpx?file=/index.js

Are we missing some configuration to avoid this behaivor or is it an edge case?

Cheers from Norway,
Simon

@ghost ghost changed the title Cursor position when deleting last whole number of a decimal Cursor position when deleting last number before seperator May 6, 2021
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

0 participants