Skip to content

Cursor position when deleting last number before seperator #116

@ghost

Description

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions