The Wayback Machine - https://web.archive.org/web/20240118193847/https://github.com/microsoft/vscode/issues/195715
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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support iframe based editors to reparent into floating windows #195715

Open
bpasero opened this issue Oct 16, 2023 · 6 comments
Open

Support iframe based editors to reparent into floating windows #195715

bpasero opened this issue Oct 16, 2023 · 6 comments
Assignees
Labels
feature-request Request for new features or functionality notebook webview Webview issues workbench-auxwindow Issues related to use of auxiliary ("floating") windows.

Comments

@bpasero
Copy link
Member

bpasero commented Oct 16, 2023

With floating windows, users have the desire to move editors out of the main window into the child window. Some of our editors use an absolute positioned iframe element that is resized and moved to fit into the editor area it belongs to. This will not work anymore as soon as the editor moves out of the window.

I already made a pass and configured currently unsupported editors with the new AuxWindowUnsupported capability.

This impacts custom editors as well as notebooks.

Steps to move an editor out to a floating window:

  • remove the AuxWindowUnsupported capability for the editor of choice
  • open such an editor
  • trigger the "Move active editor into a new window" action from the command palette

//cc @Tyriar

@r3m0t
Copy link
Contributor

r3m0t commented Dec 9, 2023

Can I work on this one? My interest is in the notebook editor.

Is it possible to use DOM appendChild to move the iframe from one window to another?

Maybe retainContextWhenHidden: false is an easy case that can be done first? In this case the editor iframe can be safely destroyed and a new one created.

@bpasero
Copy link
Member Author

bpasero commented Dec 9, 2023

@r3m0t thanks for willing to chime in, I think @rebornix has already started on this so maybe he could comment

@r3m0t
Copy link
Contributor

r3m0t commented Dec 10, 2023

@bpasero
Copy link
Member Author

bpasero commented Dec 11, 2023

Thanks for asking, maybe #196148 or #196579. The others seem rather complex to me.

@abrahan-munro
Copy link

This issue is hard to find as it doesn't contain the text of the error message, so I'm adding that now:

This type of editor cannot be opened in other windows yet.

Also, an explicit list of windows that are affected would help with searching, e.g.

  • markdown preview
  • extensions

@rebornix
Copy link
Member

Is it possible to use DOM appendChild to move the iframe from one window to another?

@r3m0t thanks for offering help. Unfortunately we can't move/reparent iframe, it is always a re-create if we are moving the notebook editor to aux window. In addition to the challenge with iframe, we have a borrow-editor concept for notebook which needs to tweaked to get this working. I have a draft which I can send a PR for soon.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature-request Request for new features or functionality notebook webview Webview issues workbench-auxwindow Issues related to use of auxiliary ("floating") windows.
Projects
None yet
Development

No branches or pull requests

5 participants