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

Input is cleared when user is trying to use wrong decimal marker and number starts with 0 #1030

Closed
matszym opened this issue Aug 15, 2022 · 3 comments

Comments

@matszym
Copy link

matszym commented Aug 15, 2022

🐞 bug report

Is this a regression?

I don't know last working version.

Description

Mask separator.2 is not working correctly, when the whole number is 0. When user is entering 0,, where decimal marker is ., not , the 0 is removed

🔬 Minimal Reproduction

https://jsdaddy.github.io/ngx-mask-page/main
Navigate to separator example. When you type : 1, - , is correctly truncated, in the input there is number 1.

If you start with 0 - Trying to input 0, everything is truncated, not just the ,. Input is blank

🔥 Exception or Error

There are not exception or errors

🌍 Your Environment

Angular Version:
Ubuntu 20.04, Chrome Version 103.0.5060.114 (Official Build) (64-bit)




Your global Angular CLI version (14.1.2) is greater than your local version (14.0.6). The local Angular CLI version is used.

To disable this warning use "ng config -g cli.warnings.versionMismatch false".

     _                      _                 ____ _     ___
    / \   _ __   __ _ _   _| | __ _ _ __     / ___| |   |_ _|
   / △ \ | '_ \ / _` | | | | |/ _` | '__|   | |   | |    | |
  / ___ \| | | | (_| | |_| | | (_| | |      | |___| |___ | |
 /_/   \_\_| |_|\__, |\__,_|_|\__,_|_|       \____|_____|___|
                |___/
    

Angular CLI: 14.0.6
Node: 16.14.0
Package Manager: npm 6.14.16 
OS: linux x64

Angular: 14.0.6
... animations, cli, common, compiler, compiler-cli, core, forms
... language-service, platform-browser, platform-browser-dynamic
... router

Package                            Version
------------------------------------------------------------
@angular-devkit/architect          0.1400.6
@angular-devkit/build-angular      14.0.6
@angular-devkit/core               14.0.6
@angular-devkit/schematics         14.0.6
@angular/cdk                       14.0.5
@angular/material                  14.0.5
@angular/material-moment-adapter   14.0.5
@schematics/angular                14.0.6
ng-packagr                         14.0.3
rxjs                               7.5.6
typescript                         4.7.4
@Khaldor48
Copy link

+1

@NepipenkoIgor
Copy link
Collaborator

@matszym @Khaldor48 Thank you that using ngx-mask . Please use ng-mask >=14.2.3
You could try https://jsdaddy.github.io/ngx-mask-page/main but pay attention that by default decimalMarker= [',','.']
You could specify needed decimalMarker=',' or decimalMarker='.'

@Khaldor48
Copy link

Thank you for your response and work <3

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