RobinHerbots / Inputmask

Input Mask plugin
https://robinherbots.github.io/Inputmask/
MIT License
6.39k stars 2.17k forks source link

Fixed chars in maskedinput mask #21

Closed fab60 closed 12 years ago

fab60 commented 12 years ago

Hi Robin,

I'm trying to set up a numeric mask with a first fixed part: i.e 0506-9999-999999. I've successfully used the escape char to insert the first four chars in the mask and the input is masked correctly.

There is alas a problem when a buffer rewrite is triggered and the fixed part of the mask is being written with a sliding effect on the input.

Am I missing something to canonically handle my scenario?

Thanks in advance

RobinHerbots commented 12 years ago

I see the problem. It's because the fixed part is also valid for the masked part. I will fix this on the dev branch soon. Robin Op 20 jan. 2012 17:41 schreef "fab60" < reply@reply.github.com> het volgende:

Hi Robin,

I'm trying to set up a numeric mask with a first fixed part: i.e 0506-9999-999999. I've successfully used the escape char to insert the first four chars in the mask and the input is masked correctly.

There is alas a problem when a buffer rewrite is triggered and the fixed part of the mask is being written with a sliding effect on the input.

Am I missing something to canonically handle my scenario?

Thanks in advance


Reply to this email directly or view it on GitHub: https://github.com/RobinHerbots/jquery.inputmask/issues/21

RobinHerbots commented 12 years ago

Hi fab60,

You can find the fix in the dev branch. https://github.com/RobinHerbots/jquery.inputmask/commit/ace3ae72453cd2ab6f7fefdd44e1ec93b21835ea

Can you test it and give some feedback.

Best regards,

Robin

RobinHerbots commented 12 years ago

Solution in dev, will merge it later to master

fab60 commented 12 years ago

Hi Robin,

sorry for being late on this. I've tested the fix and it's ok. Thank you very much for your hard work.

RobinHerbots commented 12 years ago

No problem fab60 ;-)