Open mgrzego3 opened 1 year ago
+1
Similarly, when visiting an element without editing it. Just place the cursor first on the element with the mask, and then move the focus to another element. I think this is invalid behavior since the user didn't actually change the value, but the element already has the "ng-dirty" class.
Similarly, when visiting an element without editing it. Just place the cursor first on the element with the mask, and then move the focus to another element. I think this is invalid behavior since the user didn't actually change the value, but the element already has the "ng-dirty" class.
I can confirm this is an issue.
Originally reported with https://github.com/primefaces/primeng/issues/9251
Seems to be an issue with p-dropdown as well, seeing this behavior with both controls looking at a couple bugs in an application at my organization. Maybe effecting all input types?
Describe the bug
When changing mask from ts input gets dirty state. Click "Change mask" button without touching input
Environment
Ran from ng serve
Reproducer
https://stackblitz.com/edit/primeng-inputmask-demo-mwuq6g?file=src%2Fapp%2Fapp.component.html,src%2Fapp%2Fapp.component.ts,src%2Fapp%2Fapp.module.ts,package.json
Angular version
15.1.3
PrimeNG version
15.2.0
Build / Runtime
Angular CLI App
Language
TypeScript
Node version (for AoT issues node --version)
16.14.0
Browser(s)
firefox, chrome
Steps to reproduce the behavior
Expected behavior
Nothing changed, input stays pristine