-
Notifications
You must be signed in to change notification settings - Fork 275
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[BUG]: The focus state of the production key CardNumberElement is unstable #549
Comments
Hey there, taking a look at your reproduction (thanks for that!), I can see you've implemented some floating labels that overlap with the input fields and animate on focus when empty. From my testing, the focus/blur issues are directly tied to this label design/behaviour. Taking those away, or disabling the ovarlay/animation, eliminates the problem. We've been unable to reproduce this behaviour in any other split card element test integration (ie, without such labels), so I would recommend debugging that implementation and consider not placing labels in a way that overlaps the input fields. |
If you are able to reproduce this without such a label implementation, please do share that example & necessary steps so that we can investigate again. |
Hello, thank you very much for your response. In standard interaction guidelines, the absence of a cursor while entering input is quite odd, especially for a critical payment component. I am concerned that this might create psychological stress for our users. If this issue can be resolved, we can continue using the aforementioned interaction approach without the cursor problem recurring. |
Hello, Even if I don’t use this interaction, the issue of the cursor not appearing and not being properly focused still occurs. I have also communicated with the Stripe team via email, and this issue is quite strange. It seems to be related to the publishableKey. In our sandbox environment, the publishableKey does not cause this issue, but when switching to the production environment, the problem occurs. |
I would recommend continuing to work via that support case, then. If you have a reproduction of this effect without the previous label implementation, I recommend sharing that in the case along with steps to reproduce the behaviour. |
What happened?
Steps to reproduce:
1、Ensure the latest version of Chrome is installed, then switch to mobile mode.
2、
Here is my reproduction code, and the publishableKey I’m using works fine.
However, when switched to our production key, the issue occurs.
I currently can’t provide our production publishableKey, but can you reproduce it using your own publishableKey?
2024-12-03.10.56.03.-.Compressed.with.FlexClip.mp4
Because our business heavily relies on this interaction, this is how it looks in our use case.
This also causes the soft keyboard to jitter.
2024-12-03.10.58.59.-.Compressed.with.FlexClip.mp4
This is the effect on a Samsung S20 with the latest Chrome version and the latest Android version.
IMG_1601.2.-.Compressed.with.FlexClip.-.Compressed.with.FlexClip.-.Compressed.with.FlexClip.mp4
Environment
macos 14.6.1 (23G93) chrome 131.0.6778.86(正式版本) (arm64)
Reproduction
https://codesandbox.io/p/sandbox/7mk4r4
The text was updated successfully, but these errors were encountered: