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

Refresh floating window #88

Open
dryodryo opened this issue Jan 31, 2025 · 1 comment
Open

Refresh floating window #88

dryodryo opened this issue Jan 31, 2025 · 1 comment
Assignees

Comments

@dryodryo
Copy link

Thank you for a very helpful extension. I tried all of the available extensions and this is the only one that worked properly.

After opening the preview, I want to float the window. (Multi monitor setup.) Once the window is floating, the preview rendering disappears and I only get a blank window.

If I make a change in the code editor, this forces the floating window to refresh.

@EFanZh EFanZh self-assigned this Feb 1, 2025
@EFanZh
Copy link
Owner

EFanZh commented Feb 3, 2025

It seems that the WebView is recreated after detaching the preview window, and all its internal states are lost. I see two possible fixes:

  • Ask Visual Studio Code to update its code so that the WebView states are preserved when attaching and detaching windows. This may be the best approach because it could also fix similar problems for all other extensions.
  • Save the preview state in the extension’s state so that it is not destroyed along with the WebView. This requires some architectural changes in the extension and may incur some performance loss due to communication costs between the extension and the WebView.

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