Skip to content
This repository has been archived by the owner on Dec 11, 2019. It is now read-only.

captcha not being dismissed when closing tab/restarting browser #14279

Closed
kjozwiak opened this issue May 30, 2018 · 10 comments
Closed

captcha not being dismissed when closing tab/restarting browser #14279

kjozwiak opened this issue May 30, 2018 · 10 comments

Comments

@kjozwiak
Copy link
Member

kjozwiak commented May 30, 2018

Description

Similar to #14242, the captcha won't be dismissed if it's visible and a user either closes the about:preferences#payments tab or restarts the browser.

Steps to Reproduce

Case 1:

  1. launch 0.22.723 using LEDGER_ENVIRONMENT=staging
  2. enable Payments via about:preferences#payments
  3. click on Claim my Tokens
  4. once you see the captcha, close the about:preferences#payments tab
  5. load about:preferences#payments again and you'll notice that the captcha is visible

Case 2:

  1. launch 0.22.723 using LEDGER_ENVIRONMENT=staging
  2. enable Payments via about:preferences#payments
  3. click on Claim my Tokens (the captcha should be visible)
  4. close the about:preferences#payments and restart the browser
  5. load about:preferences#payments again and you'll notice that the captcha is visible

Actual result:

captchaissue1

Expected result:

When the user either closes the about:preferences#payments tab or restarts the browser and the captcha is still visible, it should be dismissed when the user returns to about:preferences#payments.

Reproduces how often:

100% reproducible using the about STR.

Brave Version

about:brave info:

Brave: 0.22.723 
V8: 6.6.346.32 
rev: edb3e880ba039aa41b3e032cbcf8a679ebd0ea08 
Muon: 6.0.12 
OS Release: 10.0.16299 
Update Channel: Release 
OS Architecture: x64 
OS Platform: Microsoft Windows 
Node.js: 7.9.0 
Brave Sync: v1.4.2 
libchromiumcontent: 66.0.3359.170

Reproducible on current live release:

Nope, currently not reproducible on the latest release as this feature is being implemented in this milestone.

Additional Information

@NejcZdovc
Copy link
Contributor

@kjozwiak do you think that we want to dismiss it? I think that it's ok that we save this state so that you can pick up where you left off.

@NejcZdovc
Copy link
Contributor

cc @bradleyrichter wdyt?

@LaurenWags
Copy link
Member

@NejcZdovc if we do leave it as is, and UGP runs out before the user comes back, do you foresee any issues?

@NejcZdovc
Copy link
Contributor

@LaurenWags it will say UGP no more available

@kjozwiak
Copy link
Member Author

I think from a UI/UX/aesthetic perspective, you never want to leave a modal/warning/captcha opened once the user has interacted with something and decided to close and not continue the process. When they decide to return to the about:preferences#payments area of Brave, they should see the default screen without seeing something like a captcha, even if they've already started the process. Just my IMO.

Lets have @bradleyrichter weight and see what he says even though technically, this won't cause any issues as @NejcZdovc mentioned above.

@NejcZdovc
Copy link
Contributor

talk with design team, will implement it tomorrow 😃

NejcZdovc added a commit to NejcZdovc/browser-laptop that referenced this issue May 31, 2018
NejcZdovc added a commit that referenced this issue May 31, 2018
Fixes captcha clear on tab close/restart
NejcZdovc added a commit that referenced this issue May 31, 2018
Fixes captcha clear on tab close/restart
NejcZdovc added a commit that referenced this issue May 31, 2018
Fixes captcha clear on tab close/restart
@srirambv
Copy link
Collaborator

14279

This only works if the tab is closed via the close tab button and preferences page is opened again in a new tab. Closing the payment tab with keyboard shortcut and reopening closed tab doesn't dismiss the claim grant modal.

@srirambv srirambv reopened this May 31, 2018
@NejcZdovc
Copy link
Contributor

NejcZdovc commented Jun 1, 2018

As far as I can tell this is a problem with reopening last closed tab and not keys navigation. If I try with this STR it's working

  1. open new tab
  2. press cmd + , (to open preference page)
  3. claim grant
  4. cmd + w
  5. press cmd + , (to reopen preference page)
  6. go to payments

Closing this for now as logic used for this is the same as in the current release for reopening last closed tab.

@srirambv please create new issue for last closed tab. Will take a look in the mean time

@NejcZdovc
Copy link
Contributor

NejcZdovc commented Jun 1, 2018

This is not working, because close tab is not triggered anymore

@petemill which event should we capture here to fix this https://github.com/brave/browser-laptop/blob/master/app/browser/tabs.js#L172?

@srirambv
Copy link
Collaborator

srirambv commented Jun 1, 2018

Verified on Windows x64 using

  • 0.22.725 e6dd17f
  • muon 6.0.12
  • libchromiumcontent 66.0.3359.170
  • Verified restart browser doesn't retain overlay
  • Verified close tab and reopen payments doesn't retain overlay

Verified with macOS 10.12.6 using

  • 0.22.726 de06446
  • muon 6.0.12
  • libchromiumcontent 66.0.3359.170
  • Verified restart browser doesn't retain overlay
  • Verified close tab and reopen payments doesn't retain overlay

Verified on Ubuntu 17.10 x64

  • 0.22.727 2c94bba
  • muon 6.0.12
  • libchromiumcontent 66.0.3359.170

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.