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

Deleting using backspace properly not working while it's a masked field like phone number in angular formly #242

Open soumyamishra12 opened 6 years ago

soumyamishra12 commented 6 years ago

I am trying to delete a selected text out of a masked phone number and it doesn't delete the selected text rather it deletes the the previous value.

The example is same as http://jsbin.com/hasosog/7/edit?html,css,js,output.

example is ,if (123)-456-7890 is there and you select 78 and try using back space it deletes 6 instead of 78 as the thing is being selected but the same works as expected for delete .

There is a work around for ngMask but not for ui-mask ,Please help .