JsDaddy / ngx-mask

Angular Plugin to make masks on form fields and html elements.
https://jsdaddy.github.io/ngx-mask
MIT License
1.16k stars 300 forks source link

using separator.x we can't removed when caret is after a space #1166

Closed walkadaw closed 1 year ago

walkadaw commented 1 year ago

Is this a regression?

Yes. it is worked in previous version 11.x.x

Description

When we used separator.x, the cursor didn't move when the caret is after the space and we press the backspace key.

🔬 Minimal Reproduction

  1. go to https://jsdaddy.github.io/ngx-mask/#2
  2. go to separator section
  3. write 123456789
  4. move caret after space.
  5. press backspace result: Nothing happen, [expected caret muved on 1 step back](expected: caret moved on 1 step back)

https://stackblitz-starters-b1wfa7.stackblitz.io

🌍 Your Environment

Angular Version:


Angular CLI: 15.2.0
Node: 18.12.1
Package Manager: npm 8.18.0
OS: win32 x64

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

Package                         Version
---------------------------------------------------------
@angular-devkit/architect       0.1502.0
@angular-devkit/build-angular   15.2.6
@angular-devkit/core            15.2.0
@angular-devkit/schematics      15.2.0
@schematics/angular             15.2.0
ng-packagr                      15.1.2
rxjs                            6.6.7
typescript                      4.8.4
andriikamaldinov1 commented 1 year ago

@walkadaw Thanks for your using Ngx-Mask. Please update to latest version. It example, all work as expected - https://stackblitz.com/edit/angular-g3n7xd?file=src%2Fmain.ts