Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How does PayPal disable your browser's toolbar access when you ue the new Checkout buttons

When you click on the PayPal Button in v2 of the API, the browser's toolbar etc is also greyed out and not accessible. It is re-enabled when the PayPal process finishes. The actions are the same as if it was a modal popup BUT it applies to the whole browser.

enter image description here

Presumably this is a function built into the PayPal API but I didn't think this was possible but it obviously is.

Anyone know the script to do this?

like image 272
David Avatar asked Mar 24 '19 01:03

David


1 Answers

I think that this is a Firefox specificity. I explain:

When you try to pay with a Paypal account, it opens a new browser window used to authenticate you to your Paypal account (so the website itself doesn't know what you're typing - security reason).

When Firefox launch this new window, it disable "parent" window interactions.

I don't have any source to prove this, but that's how some Electron's windows works so I think that's how it's working.

You should look at the window.open implementation in Firefox to be sure.

like image 144
Elanis Avatar answered Oct 29 '22 17:10

Elanis