vuejs-tips / v-money

Tiny (<2k gzipped) input/directive mask for currency
https://vuejs-tips.github.io/v-money/
778 stars 255 forks source link

Function setCursor is getting triggered infinitely in Safari #74

Open swinadeor opened 5 years ago

swinadeor commented 5 years ago

We found an issue when having more than one money field in our application in Safari. When the user enters a value in one field and then changes to the other and inserts another value and then goes back and does the same in a cycle many times then we get some flickering between both fields as if it doesn't know which to do the focus so it tries to do the focus in one and then the other and so on.. We noticed that the setCursor gets called all the time when that starts to happen.

Example for Safari: https://jsfiddle.net/1n9whds0/1/

ahoiroman commented 5 years ago

I noticed this weird behavior, too.

But: I am not sure, whether this component is still in active development. @swinadeor: Did you find a workaround?

It even happens on the demo site: https://vuejs-tips.github.io/v-money/

swinadeor commented 5 years ago

We didn't find any workaround but another idea was to check out v-numeric.

ahoiroman commented 5 years ago

Thanks for your reply. I checked out dm4t2/vue-currency-input, which is actively maintained. There's a bug at the moment, but I hope the author is going to fix this soon.

swinadeor commented 5 years ago

Awesome! Thanks for the info!! I'll take a look at it. 😃

ahoiroman commented 5 years ago

The issue I reported has been fixed. It‘s a good alternative now.