-
Notifications
You must be signed in to change notification settings - Fork 30.4k
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
Explore moving webcontents around when moving editors with webviews #5257
Comments
Idea is to maybe use absolute positioning (or flex layout?). Potential issues I see:
|
Electron adds support to move webcontents between webview instances (electron/electron#7157). We should explore if this is a solution for the problem. |
In vscode 1.8 / electron 1.4.6 changing tabs back and forth still gives a new guestintance id for an open webview each time the web view is shown hidden. |
@mjbvz it looks like you solved it with your new approach of positioning the webview absolute? |
@mjbvz fyi this might be interesting to you: electron/electron#7157 When I played with it I could not really get it to work. Nevertheless I think #5257 (comment) applies to your solution that you picked now. |
Yes we can explore using guestInstance. Accessibility seem to work using the existing absolute position approach but there are a few edge cases around positioning as you found We also need to be able to keep webviews alive when their editor is no longer visible. We may be able to use a hidden webview element as a cache for this case |
Blocked by electron/electron#12251 . Out editors destroy their content before webview has a chance to transfer itself over to the new webview inside the new editor. Not sure if there is any workaround |
@mjbvz not sure if it makes your life easier, but with the introduction of grid layout, an editor will always stay fixed to its parent container, even if the view is moved around. Of course, in the end if the view is moved, the grid widget will still remove the element from the DOM and put it somewhere else. I am also not sure if you are still using the hack to position webviews absolutely, maybe you could test this in the grid branch ( |
@bpasero Thanks. I think we may have to stick with the absolute positioning in order to support the |
It looks like electron/electron#12251 was closed and will not be supported with Electron 3.0.x onwards. |
I know you were waiting for it. Please don't reparent editors during slot assignment because some dom element don't survive such action.
Related to #5039
The text was updated successfully, but these errors were encountered: