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

fix(browser): Close browser targets before closing browser itself #3676

Closed
wants to merge 1 commit into from

Conversation

gidztech
Copy link

@gidztech gidztech commented Dec 14, 2018

This PR fixes #3673 by adding logic to browser.close to close the browser targets first before the browser. This seems to ignore the beforeunload dialog on the page and succesfully closes the browser.

Copy link
Contributor

@aslushnikov aslushnikov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the PR. Solving this on puppeteer-side is racy: targets might spawn new targets with beforeunload dialogs and so on.

I've submitted a CL to fix this on the protocol-side: https://chromium-review.googlesource.com/c/chromium/src/+/1381513

@aslushnikov
Copy link
Contributor

Closing this PR in favor of upstream fix.

@gidztech
Copy link
Author

Ah yes that makes sense.

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

Successfully merging this pull request may close these issues.

browser.close hangs with beforeunload dialog
2 participants