Open mgrzego3 opened 1 year ago
I noticed a similar behaviour but linked to the autocomplete property.
Setting autocomplete="off" prevents from having the cursor moving into or at the end of the mask.
It also prevents the user from inputing a value, which is an usability issue. A user enters the field with the cursor at the end with remaining room in the mask to enter content and tries to input a value, expecting something to show up in the field, but there is no response.
A user's likely expectation is:
Describe the bug
If required property is added to p-inputmask behaviour of cursor changes. Instead of going at the beginning of the mask it goes closest to place where click occurs.
Click in the middle of p-inputmask with required property: Click in the middle of p-inputmask without required property:
Environment
ng serve
Reproducer
https://primeng-inputmask-demo-2qppbg.stackblitz.io
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
Cursor should be at the beginning of mask