Caret position is offset by 1 when credit card number and/or expiry inputs are formatted while typing in full-width.
Note that this issue is related to #20.
How to reproduce the issue?
1- Set keyboard to an input source with full-width characters — any Chinese, Japanese, or Korean (CJK) input such as Hiragana will suffice.
2- Use either of the following formatting helpers on a <input> element:
payform.cardNumberInput(input)
payform.cardExpiryInput(input)
3- Start typing a valid date or credit card value (e.g. 4012 8888 8888 1881)
4- As the value gets formatted (e.g. addition of a whitespace or /), see that the caret position is offset.
How does it affect users?
Unable to select all input via shortcuts due to wrong selection range
What is the issue?
Caret position is offset by 1 when credit card number and/or expiry inputs are formatted while typing in full-width. Note that this issue is related to #20.
How to reproduce the issue?
1- Set keyboard to an input source with full-width characters — any Chinese, Japanese, or Korean (CJK) input such as
Hiragana
will suffice.2- Use either of the following formatting helpers on a
<input>
element:3- Start typing a valid date or credit card value (e.g. 4012 8888 8888 1881)
4- As the value gets formatted (e.g. addition of a whitespace or
/
), see that the caret position is offset.How does it affect users?