Skip to content
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

When allowing '-' for negative numbers, bug when selecting all and pressing '-' #903

Closed
boltex opened this issue May 26, 2021 · 3 comments
Closed

Comments

@boltex
Copy link

boltex commented May 26, 2021

Thanks for your great product,

but I just found a bug in relation with the 'allowNegativeNumbers' option and the press of the '-' key whilehaving the whole input text field selected. (all highlighted)

Easy to reproduce with the [allowNegativeNumbers]="true" parameter, which let user have negative numbers by allowing '-' character at front:

When having a numeric input with a mask restricting the number input, selecting all the input field's content, and then typing the negative symbol '-', results in the whole field gets cleared and left empty, instead of all being replaced with the '-' character.

@msankar1991
Copy link

@boltex Did you found any solution for your question. For me also needs same solution let me know.

@andriikamaldinov1
Copy link
Collaborator

@boltex @msankar1991 Thank you for using ngx-mask. Please update ngx-mask to latest version.
[allowNegativeNumber]="true", work as expected

https://stackblitz.com/edit/angular-em2ulz?file=src%2Fmain.ts

@boltex
Copy link
Author

boltex commented May 16, 2023

@andriikamaldinov1 Wow! Thank you! (& please Stay safe !!)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants