-
Notifications
You must be signed in to change notification settings - Fork 320
iOS Keyboard reopens with numberbad after loosing focus and closing keyboard #174
Comments
Same problem here. This isn't link to this repository and its components since I don't use them, I did my own wrapper around the stripe.js script. I confirm this is specific to Safari on iOS, I don't have the problem elsewhere. I keep digging but some help from you guys would be great @michelle Thanks |
More investigation :
|
I found this problem is already discussed in #161 with a (kind of) workaround from @asolove-stripe Why are you not fixing it ? This is basically making impossible to use your library on ALL iOS devices, it should be at least mentioned on the documentation page (https://stripe.com/docs/stripe-js) and in the readme of this repository. We should not have to dig in closed (unresolved) issues on github to eventually find something related. EDIT: I'm using something a bit more twisted (not really a fan, but at least it works in every case) : // With element being a reference to the card element created by stripe.elements()
// or the CardElement component.
element.addEventListener('blur', ev => {
// Apply only as a workaround for Safari on iOS,
// else it will create an infinite loop on the `blur` event.
if (navigator.userAgent.search("iPhone") != -1 &&
navigator.userAgent.search("Version/" != -1)) {
element.focus()
element.blur()
}
// This is mandatory for all browsers
element.getElementsByTagName("iframe")[0].blur()
} |
Hi @Sylv3r! Thanks for the note, and sorry for the trouble this has been causing you. We're actively working on a fix internally and will post an update when it's out. |
This should now be fixed! Let us know if you're still seeing issues. |
We're still seeing this issue. On version 1.6.0 the keyboard persists after the submit action and the app has moved to the next page. |
Hi @afholderman |
@cweiss-stripe I was able to create a minimal repo and reproduce the issue on an ipad IOS 10.3.3. Once you click pay the keyboard will persist https://codesandbox.io/s/l72l6k779q |
Thank you @afholderman I can confirm that I am also seeing this issue with react-stripe-elements and split card* fields on Mobile Safari. I'll reopen this PR and we'll post an update here once this is fixed. |
@afholderman thanks again for providing the details! |
@cweiss-stripe we have confirmed the fix in codesandbox and our application, thank you! |
I found this issue through a google search. I'm having a similar issue in our private codebase in an input that has some formatting logic. It turned out that our issue was happening because we update the cursor position of the input (using a ref) in Just thought I'd throw this in here in case it helps with your issue. |
Can somebody please provide more information about how this has been fixed? I have the same issue with vue-stripe-elements and I’m not able to work around it using the information provided above. |
Still an issue here, too. The keypad doesn't dismiss but worse is that even if the user dismisses it manually with "Done", it comes back later as they tap around. We're using elements directly -- no react or vue, etc. |
Same issue using ember-stripe-elements too. |
@granmoe @LeBenLeBen @jackhair @davebalmer |
@cweiss-stripe Thank you, can confirm this is fixed for us using the ember wrapper. Which repo reflects the update for reference? |
@cweiss-stripe I can still reproduce the problem, but I think I narrowed the cause now. When I submit the form to get the token and then process the payment, I hide the Stripe Element and show a loader instead. In that specific case the bug happens. Here is a minimal reproduction case: https://codesandbox.io/s/0p8q30n30n (see App.vue file where every happens, except the Stripe JS file being included in index.html)
Could you please see if you can fix that case on your side as well or share any hints you would have to work around it? 🙇 |
@LeBenLeBen Thanks for the example! |
@cweiss-stripe Actually I use I tried to change the I think I have enough information to work around it now, thanks for your help! |
Hi to All, I thing you get the separate problem to my, at iOS, maybe somebody can help me with stripe elements, I have use vue-stripe-elemetns and stripe-client packages but still get this on iPhone Safari. |
@alexander-v-ysbm, I'm seeing the same issue but using the current version of stripe.js directly with no wrapper. Using |
@binomialstew Yikes, that doesn't sound good! I'm looking at our logs and can't seem to find an instance of this happening. I also tried several things in our test pages and couldn't make this happen. Do you have a url or a set of steps that can reliably reproduce it? |
@asolove-stripe, thanks for reaching out. I just looked at this again and realize it was my fault. I'm using a |
Are you all using Firefox on iOS by any chance? I just had this issue: I would click on an input box, then click 'x' or 'done' on the keyboard, and then whenever I clicked anywhere else the keyboard would pop back up. The code that simulated it is here
It does not happen on Safari or Chrome. |
Summary
The keyboard reopens automatically while clicking around.
iOS 11.2.1
Chrome 64.0.3282.112
Safari
Other information
Steps to reproduce:
Can also be reproduced here: https://stripe.github.io/elements-examples/
Done
or the X buttonThe text was updated successfully, but these errors were encountered: