Only remove guest from embedder when view id changes
This commit is contained in:
parent
f454cb3408
commit
a737732521
1 changed files with 6 additions and 2 deletions
|
@ -162,8 +162,12 @@ const attachGuest = function (embedder, elementInstanceId, guestInstanceId, para
|
|||
if (guestInstance.elementInstanceId) {
|
||||
const oldKey = `${guestInstance.embedder.getId()}-${guestInstance.elementInstanceId}`
|
||||
delete embedderElementsMap[oldKey]
|
||||
webViewManager.removeGuest(guestInstance.embedder, guestInstanceId)
|
||||
guestInstance.embedder.send(`ELECTRON_GUEST_VIEW_INTERNAL_DESTROY_GUEST-${guest.viewInstanceId}`)
|
||||
|
||||
// Remove guest from embedder if moving across web views
|
||||
if (guest.viewInstanceId !== params.instanceId) {
|
||||
webViewManager.removeGuest(guestInstance.embedder, guestInstanceId)
|
||||
guestInstance.embedder.send(`ELECTRON_GUEST_VIEW_INTERNAL_DESTROY_GUEST-${guest.viewInstanceId}`)
|
||||
}
|
||||
}
|
||||
|
||||
const webPreferences = {
|
||||
|
|
Loading…
Reference in a new issue