You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
No opener using native window.open from an iframe in non-sandbox mode #9533
I was using native window.open in sandbox mode until this PR was merged : #8963
I switched to non-sandbox mode using the version 1.7.1 and what happen is that, if your main app is embedded in an iframe and if it open a new window using window.open, the new window won't have window.opener set
If I load the same app directly in the main window and not using the iframe, it is working as expected
changed the title [-]No opener using window.open from an iframe in non-sandbox mode[/-][+]No opener using native window.open from an iframe in non-sandbox mode[/+]on May 19, 2017
Activity
[-]No opener using window.open from an iframe in non-sandbox mode[/-][+]No opener using native window.open from an iframe in non-sandbox mode[/+]kevinsawicki commentedon May 23, 2017
@AshDevFr are you setting the
nativeWindowOpenoption totrueon theBrowserWindow?kevinsawicki commentedon May 24, 2017
@AshDevFr I'm having trouble reproducing this with the following example, can you confirm if it works for you or not?
index.js
frame.html
index.html
popup.html
AshDevFr commentedon May 24, 2017
@kevinsawicki I was using this:
I was not setting the parent with
parent: mainWindowbecause if I do it it link the popup window to the parent position.I will try your example and let you know if it is working for me.
Thank you
kevinsawicki commentedon Jun 12, 2017
@AshDevFr were you able to confirm if it is working for you?
codebytere commentedon Sep 27, 2017
Closing due to abandonment.
Gvozd commentedon Jul 4, 2018
To correct window.opener, and work facebook(and others) logins
You need use
webPreferences.nativeWindowOpen=true, and set samewebPreferences.affinityfor mainWindow, and opened windows(hook onmainWindow.webContents.on('new-window'))https://gist.github.com/Gvozd/2cec0c8c510a707854e439fb15c561b0