amarkes / br-masker-ionic-3

mascara para inputs
MIT License
110 stars 32 forks source link

Cursor position not being preserved #41

Open iget-esoares opened 6 years ago

iget-esoares commented 6 years ago

Hi there,

I've found a bug that's very annoying and bad for UX.

If you start to type into a mask, for example a CPF mask, then manually back the cursor to another position to fix something, after type or delete some character, the cursor goes to the end of the input value.

For example

> Imagine that "|" is the cursor
123.456.789-12| 

> If I misspelled and want to replace "123" by "321", I will set the cursor after the 3
123|.456.789-12

> Then will press backspace
124.567.891-2|

> Note that now the cursor is at the end, not where it was.
> If I press backspace more two times (in order to delete the 123), I'll get this, instead of the expected
124.567.89

This causes a very, very annoying user experience. Imagine you at a mobile. You will be forced to delete everything to type again, or position the cursor after every typing.

mladilav commented 6 years ago

Any news?

amarkes commented 6 years ago

to speak the truth, never even seen xD

babarhamid commented 5 years ago

having the same issue. @amarkes please look into it.