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

[Bug]: Electron app crash on clicking a link whose target is _blank in webview when nativeWindowOpen: true and allowpopups enabled on MacOS #31127

Closed
3 tasks done
alokmahor opened this issue Sep 26, 2021 · 3 comments
Labels

Comments

@alokmahor
Copy link

Preflight Checklist

Electron Version

12.0.5

What operating system are you using?

macOS

Operating System Version

MacOS Catalina 10.15.7

What arch are you using?

x64

Last Known Working Electron version

did not try on preview version

Expected Behavior

New window should open on clicking a link with target="_blank" in webview irrespective of value of nativeWindowOpen when allowpopups is added in <webview> tag

Actual Behavior

Application get crashed when I click a link with target="_blank" in <webview> when I add allowpopups in <webview> and add nativeWindowOpen: true in webPreferences in mainWindow.

Crashing error is exited with signal SIGSEGV

main.js

const mainWindow = new BrowserWindow({
    width: 800,
    height: 600,
    webPreferences: {
      preload: path.join(__dirname, 'preload.js'),
      nativeWindowOpen: true,
      webviewTag: true
    }
  })

index.html is

<!DOCTYPE html>
<html>
  <head>
    <meta charset="UTF-8">
    <!-- https://developer.mozilla.org/en-US/docs/Web/HTTP/CSP -->
    <meta http-equiv="Content-Security-Policy" content="default-src 'self'; script-src 'self'">
    <meta http-equiv="X-Content-Security-Policy" content="default-src 'self'; script-src 'self'">
    <title>Hello World!</title>
  </head>
  <body>
    <h1>Hello World!</h1>
    <webview id="foo" src="https://www.w3schools.com/tags/att_a_target.asp" style="display:inline-flex; width:640px; height:480px" allowpopups></webview>

    <h1>click on Try it yuorself button in webview</h1>

    <!-- You can also require other files to run in this process -->
    <!-- <script src="./renderer.js"></script> -->
  </body>
</html>

Testcase Gist URL

No response

Additional Information

No response

@BlackHole1
Copy link
Member

This bug was fixed in Electron v13.1.6

see: #29874

You can use electron 12.0.14 or higher, or electron 13.1.6 or higher.

They will work normally

@BlackHole1
Copy link
Member

cc @codebytere you can now close this issue

@alokmahor
Copy link
Author

This bug was fixed in Electron v13.1.6

see: #29874

You can use electron 12.0.14 or higher, or electron 13.1.6 or higher.

They will work normally

Thank you

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants