react-stripe-js icon indicating copy to clipboard operation
react-stripe-js copied to clipboard

[BUG]: CardNumberElement onChange did not trigger when copy and paste

Open andypho opened this issue 11 months ago • 0 comments

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

  1. Copy and paste test card 1 (Amex) 378282246310005 into <CardNumberElement />, onChange triggered
  2. 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

andypho avatar Mar 03 '24 23:03 andypho