Skip to content

[896] Restore Popout content for blocked popouts and emit onDidBlockPopout event #928

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

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

borglin
Copy link

@borglin borglin commented May 9, 2025

If you restore a stored layout from JSON that includes a popout on page load, most browser will block it from opening since the user didn't initiate opening the new popup window. Currently it is hard to determine if this happens and to handle it so that pop out content isn't lost.

This adds an event that triggers if the popout fails to open because of window.open failing to return a window object (most likely blocked by browsers popup blocker) and it also adds the popout group back into grid in the same way as if you would have closed the popout window manually. Hopefully this makes sense.

This is my suggestion for how to improve the behaviour when the browsers blocks the popout from opening and I'm happy to create some settings/props to make it optional.

Todo

  • Add tests

Copy link

codesandbox-ci bot commented May 9, 2025

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

Latest deployment of this branch, based on commit 86e8e63:

Sandbox Source
customheader-dockview Configuration
dockview-app Configuration
editor-gridview Configuration
externaldnd-dockview Configuration
fullwidthtab-dockview Configuration
iframe-dockview Configuration
keyboard-dockview Configuration
nativeapp-dockview Configuration
rendering-dockview Configuration

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.

1 participant