New issue
Advanced search Search tips

Issue 685771 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Closed: Feb 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Android
Pri: 2
Type: ----



Sign in to add a comment

Add a delay to "PAY" button enabling to avoid tricking user into double-tapping an area on screen where the "PAY" button would appear.

Project Member Reported by gogerald@chromium.org, Jan 26 2017

Issue description

^^^

 
Hi rouslan@, is this bug first report by you? Could you provide more detail of the circumstance? As I know we do not process key event during animation and when processing payment.
The PAY button should be disabled for 200ms from when PaymentRequestImpl.show() was called. So, PaymentRequestUI should have a boolean mInitialPayButtonDisabled = true. PaymentRequestUI.updatePayButtonEnabled() should check mInitialPayButtonDisabled. PaymentRequestUI.show() should start a 200ms timer (mHander.postDelayed) to set mInitialPayButtonDisabled = false and call updatePayButtonEnabled().
But why would we do that? The 'pay' button is disabled at the very beginning until the user can make payment (https://cs.chromium.org/chromium/src/chrome/android/java/src/org/chromium/chrome/browser/payments/ui/PaymentRequestUI.java?rcl=753d0fd6e0a60c1f9a44215f40d98c13a4420d1f&l=602).

What's the bad result if we don't do that?
The Pay button might be enabled immediately if the user requests only Android Pay, for example. See https://googlechrome.github.io/samples/paymentrequest/android-pay/
Yes, but we already have PeekingAnimator which takes 225ms (after PaymentRequestUI.show) and we do not accept pay click before it finishes. Do we intend to delay after that animation?
In that case, it's sufficient to add a comment to the PeekingAnimator duration to say that it also serves the function of preventing the user from accidentally double-cliking on the page and thus authorizing and unwanted transaction.
Project Member

Comment 8 by bugdroid1@chromium.org, Feb 6 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/a3a75cb7e4842e3b2e8f9ccc964cc17622ed1d7e

commit a3a75cb7e4842e3b2e8f9ccc964cc17622ed1d7e
Author: gogerald <gogerald@chromium.org>
Date: Mon Feb 06 22:27:20 2017

Add extra comments to explain implicit usage of the animation duration

BUG= 685771 

Review-Url: https://codereview.chromium.org/2675183004
Cr-Commit-Position: refs/heads/master@{#448415}

[modify] https://crrev.com/a3a75cb7e4842e3b2e8f9ccc964cc17622ed1d7e/chrome/android/java/src/org/chromium/chrome/browser/payments/ui/PaymentRequestUI.java

Status: Fixed (was: Assigned)
Components: -UI>Browser>Autofill>Payments UI>Browser>Payments

Sign in to add a comment