imaskjs icon indicating copy to clipboard operation
imaskjs copied to clipboard

Cannot get unmasked value from IMaskMixin

Open sucy6330133 opened this issue 2 years ago • 0 comments

Describe the bug When using IMaskMixin, the unmasked value is always masked.

To Reproduce https://codesandbox.io/s/gallant-smoke-zw3xgh Please see the code example attached. The unmasked value is alway the same as the masked value. Also when selecting and delete the whole text in the input, then undo the action, the raw input value also has been updated to the masked value.

Is there a way to always get the unmasked value when using IMaskMixin?

Expected Behaviour

  • inputing 9999999999, the masked value should be 9999-999-999, the unmasked and raw input value are 9999999999;

  • inputing 9999-999-999, the masked value and raw input value should be 9999-999-999, the unmasked value is 9999999999;

  • inputing 9999999-999 or 9999-999999, the masked value should be 9999-999-999, raw input value should be the input, the unmasked value is 9999999999;

  • pasting and undo should follow the same behaviour as input.

sucy6330133 avatar Jun 10 '22 02:06 sucy6330133