ngx-mask icon indicating copy to clipboard operation
ngx-mask copied to clipboard

Replacement by Selection not possible if input field contains asterisk

Open gehrmanng opened this issue 8 months ago • 0 comments

🐞 bug report

Is this a regression?

Did this behavior use to work in the previous version? Yes, the previous version in which this bug was not present was: 17.1.8 (didn't test v18)

Description

Given a custom Pattern which allows entering characters, digits, dashes and asterisks with optional set to true. After entering an input value of "123*" it is not possible to replace any character by selection. The selected character gets always replaced by itself no matter what is typed in.

🔬 Minimal Reproduction

https://stackblitz.com/edit/angular-19-ngx-mask-selection-replacement

Type 123* into the input field. Then select 3 using ur mouse and type 2. The 3 will not get replaced with 2.

🔥 Exception or Error

No exception.

🌍 Your Environment

Angular Version: Angular: 19.1.6 ngx-mask: 19.0.6

gehrmanng avatar Feb 17 '25 15:02 gehrmanng