[Bug] Unexpected behavior when closing the PayPal window before it loads
See original GitHub issue🐞 Describe the Bug
There is an issue when the PayPal popup window is closed before it loads. It shows a loading element that keeps loading forever and the PayPal button is no longer clickable.
It seems it only happens when there’s an onClick
callback. For some reason it makes the window load slower, it seems.
🔬 Minimal Reproduction
- Add an
onClick
callback to the Buttons implementation. - Click the PayPal button
- Close the popup window before it loads
Here’s a codepen where you can reproduce it: https://codepen.io/romrz/pen/GRoNQKx
😕 Actual Behavior
The window is closed, but then the overlay appears with a loading element that keeps loading forever. No console errors are shown. After closing that overlay, the PayPal button is left unresponsive.
🤔 Expected Behavior
The popup window is closed and then you can click the PayPal button again to re-initiate the payment process
🌍 Environment
- Browser version: 81.0.4044.129
- OS version: Mac OS Catalina (10.15.4)
- SDK version (
window.paypal.version
): 5.0.128
Affected browsers
Tested on Chrome and FireFox
➕ Additional Context
Here’s a video of the issue in the codepen shared above: https://share.vidyard.com/watch/1jAbWvn7Z925VpDePdH4mx?
Issue Analytics
- State:
- Created 3 years ago
- Comments:14
Thank you very much for taking care of this @mnicpt
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.