-
Notifications
You must be signed in to change notification settings - Fork 135
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
Require user gesture when .show()
is called
#651
Comments
We can start requiring the user gesture in Chrome. |
This will break some implementations in the wild, so we should be thoughtful about how we do this. |
.show()
can be called..show()
is called
Requested upstream: whatwg/webidl#479 ... let's see how that goes, but we can certainly provide some prose for this in our spec if those discussions are not fruitful. |
I have just created a real world PR implementation that would break if this requirement become mandatory. It will be particularly troublesome in those cases where PR is only used partially (skipping the selection part) and payment methods execute in different Web applications since the gesture (I guess) get lost if you change URL. Yes, essentially it much boils down to how gestures and host domains are dealt within browsers. Is there actually a standard for that? |
The "partial case" wound't be affected: this only affects calling
That's what whatwg/webidl#479 would be. |
What I meant is that some users of PR (including myself) will for various reasons stick to the old school model of selecting payment methods and then let each method implement the associated payment interface in specific web applications. The methods building on PR would if I understand it right need an extra button and click. |
So the specific PR is initiated and activated including The motives the the old school approach to payment method selection and execution are two-fold:
|
Agreed. Have you seen our Payment Handler API demos? That API allows writing 3rd party payment apps in JavaScript and has ability to open a window as well. |
It should, in theory, be possible to carry over a user gesture across a navigation (see Google proposal)- but that would need to be part of HTML and supported by browsers. Effectively, what this means, is that a user could collect a bunch of items into a shopping cart, hit "buy", be navigated to a checkout page, and have the payment sheet displayed (without them having to click on another thing). That would address @cyberphone's concerns and potentially @zkoch's concerns with existing sites relying on the ability to pop up the payment sheet without user gesture. |
Yes, I have. However, as a Scandinavian, I'm rather into the 360 degree mobile payment App vision which already is a "smash hit". It is currently not clear to me how you integrate these schemes in the desktop Web using |
This would directly contradict the purpose & intention of the Donation Acceptance specification that I am working on. The "tipjar" page is supposed to immediately open a payment request. Requiring user interaction would inhibit this flow. |
@rektide, understood, but that's kinda the point. @tantek has a much nicer way of doing exactly what you propose, giving the user choice while also requiring the user to click on things. See, for example: http://tantek.com/pay/12 |
Thanks @marcoscaceres. For more background on the design & implementation of that /pay/amount page, as well as additional examples (including use of the Stripe library to implement Request Payment API), see https://indieweb.org/pay - recently discussed at IndieWebCamp Austin: https://indieweb.org/2017/Austin/pay (40 minute session video, discussing donations, recent Patreon drama etc.). |
It looks like this is already noted in the CR, but I wanted to open a ticket for this to track status on this.
ApplePayJS (whose behavior I imagine will eventually make it into Safari's PaymentRequest implementation) only allows
.show()
to be called by user activation (e.g.click
). On the other hand, Chrome allows.show()
to be called as long as the page is in focus. This makes it hard to build consistent UIs.The text was updated successfully, but these errors were encountered: