angular-ui / ui-mask

Mask on an input field so the user can only type pre-determined pattern
https://htmlpreview.github.io/?https://github.com/angular-ui/ui-mask/master/demo/index.html
MIT License
391 stars 258 forks source link

Optional parameters should not be selectable from input #214

Open Klinton90 opened 7 years ago

Klinton90 commented 7 years ago

Is it possible to make optional characters not selectable (by mouse, crtl+A, shift+arrow, etc.) from input field?

Say my format is 99-99-99?9?9. When I enter in that field 11-11-11 then ctrl+A, copy/paste (in another place), pasted value is 11-11-11__.

Cyclodex commented 7 years ago

Related to #160

Changing the placeholder to space would only solve the issue visually, it still would copy all the spaces in the end. Might need some improvements.