Page MenuHomePhabricator

[Cashtab] Show close modal if window fails to close programmatically
AbandonedPublic

Authored by bytesofman on Sun, Feb 2, 00:02.

Details

Reviewers
emack
Group Reviewers
Restricted Project
Summary

T3734

Some browsers may not respect window.close() requests. We can't do much about this. Mb they allow window.close if it comes from a button onClick, which this modal provides. If not, the modal lets the user know it is ok to close the window manually.

Test Plan

Deployed to https://679ebe646e5e0babb5e4c950--cashtab-local-dev.netlify.app/

I don't have access to a machine with safari and I'm not totally sure how this issue comes up.

npm test confirms we don't break other stuff. This (should) only be opening a modal if window.close() does not work.

Diff Detail

Repository
rABC Bitcoin ABC
Branch
fallback-close-modal
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 32289
Build 64068: Build Diffcashtab-tests
Build 64067: arc lint + arc unit

Event Timeline

bytesofman published this revision for review.Sun, Feb 2, 00:45
bytesofman edited the test plan for this revision. (Show Details)
bytesofman edited the test plan for this revision. (Show Details)
emack requested changes to this revision.EditedSun, Feb 2, 05:51
emack added a subscriber: emack.

Tested on iOS Safari 18.1.1 - after paying in cashtab.com it automatically routes back to the paybutton page with the bell and then goes back to the original wp article that triggered it. I'm not seeing the reported issue where it stays on Cashtab.com.

This revision now requires changes to proceed.Sun, Feb 2, 05:51

only reason to do this was potential safari behavior (that, if true, this diff would potentially not resolve)