Giter Site home page Giter Site logo

Comments (4)

mquandalle avatar mquandalle commented on July 26, 2024

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.

s-yadav avatar s-yadav commented on July 26, 2024

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.

Elliot128 avatar Elliot128 commented on July 26, 2024

@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.

s-yadav avatar s-yadav commented on July 26, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.