Skip to content
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

window.close works in some situation but not in another #459

Open
zoultrex opened this issue Jun 18, 2024 · 2 comments
Open

window.close works in some situation but not in another #459

zoultrex opened this issue Jun 18, 2024 · 2 comments

Comments

@zoultrex
Copy link

I have a react page loaded by inapp browser, its a test page, I have placed a simple button when onClick event is triggered it just calls window.close() and this works as expected when I load this page from my local machine using ngrok

When I publish this page live, which is a thank you page after a purchase from an ecommerce platform, the button no longer works

Could it be because first inappbrowser opens the ecommerce platform callback URL, then their page loads some data to process and when its finished redirects back to my page published on my own domain and then window.close longer works?

Is there such a security policy or anything else that is expected to prevent the window from being closed (like similar behavior to spam or whatever?) or could that be just a bug or wrong method I'm calling to close the window and the inapp browser?

I actually don't have to use window.close, but I need to have a button on my react page that makes the inapp browser close so the user goes back to the app, any other suggestion appreciated

@gabe-o-fetchly
Copy link

Can someone chime in on that? its super easy to reproduce, open a page with a button action window.close and it works
Make a page with a button that redirects to another page that then has the button with window.close and it won't work
Is this expected?

@zoultrex
Copy link
Author

zoultrex commented Jul 1, 2024

bump

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants