react-stripe-js
react-stripe-js copied to clipboard
[BUG]: CardNumberElement onChange did not trigger when copy and paste
What happened?
When using <CardNumberElement />
, onChange
did not trigger on the second copy and paste if the two cards brand are the same.
Steps to reproduce
- Copy and paste test card 1 (Amex) 378282246310005 into
<CardNumberElement />
, onChange triggered - Then Copy and paste another test card 2 (Amex) 371449635398431 into
<CardNumberElement />
, onChange did not triggered
What is expected?
onChange
should Trigger even the card brand has not been changed, It should behave the same if I copy and paste another test card (Visa) 4242424242424242 in the second step.
Version
Tested on
"@stripe/react-stripe-js": "^2.5.1"
"@stripe/react-stripe-js": "^2.1.1"
Environment
Chrome 122.0.6261.57, Debian 12
Reproduction
No response