I think you must maintain the cursor end position if it is different of the cursor start position and major the prefix length.
In my project, when I select an input the value must be fully select to help the user change it easily, but the library kills the selection when focus comes from keyboard interaction.
Migrated from original project (https://github.com/cesarrew/ng2-currency-mask/issues/114)
Orignal request by @lordazzi
In input.service.ts:
I think you must maintain the cursor end position if it is different of the cursor start position and major the prefix length. In my project, when I select an input the value must be fully select to help the user change it easily, but the library kills the selection when focus comes from keyboard interaction.