Skip to content

hideGroupingSeparatorOnFocus prop causing cursor to jump to end of input when using quasar #338

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

Closed
Dylancyclone opened this issue Aug 17, 2022 · 0 comments
Labels
bug Something isn't working

Comments

@Dylancyclone
Copy link

Vue Currency Input version

3.0.0

Vue version

3.2.31

What browser are you using?

Chrome

What operating system are you using?

Windows

Reproduction link

Quasar: https://codesandbox.io/s/using-vue-currency-input-with-quasar-veevalidate-forked-3hv067?file=/src/App.vue:106-143 and Raw HTML: https://codesandbox.io/s/vue-currency-input-vue-3-example-forked-8d8lii?file=/src/App.vue:79-116

Describe your issue

When setting the hideGroupingSeparatorOnFocus prop to false with a Quasar input as shown in the examples, the cursor will jump to the end of the input box any time a grouping separator (a comma) is added or removed from the currency number.

The expected behavior is seen in the link below. This is the simple HTML example from the examples page with the hideGroupingSeparatorOnFocus prop set to false.
https://codesandbox.io/s/vue-currency-input-vue-3-example-forked-8d8lii?file=/src/App.vue:79-116
You should be able to type at the beginning of the number and continue typing at the same place when the comma appears.
gif of expected behavior

The actual behavior is seen in the link below. This is the Quasar example from the examples page with the only change being to hideGroupingSeparatorOnFocus prop set to false.
https://codesandbox.io/s/using-vue-currency-input-with-quasar-veevalidate-forked-3hv067?file=/src/App.vue:106-143
Unlike the previous example, when you type in the field, the cursor jumps to the end of the input as soon as a comma appears/disappears
gif of unexpected behavior

As a side note, I'm not sure if this is part of the same issue or if it should be a separate issue, the same "cursor jumping" happens when typing directly after the decimal point with or without the hideGroupingSeparatorOnFocus being set:
chrome_mXkJ1Cap2F

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants