electron: [Bug]: In will-navigate e.preventDefault() does not prevent navigation to about: urls

Preflight Checklist

Electron Version

13.6.1, 15.3.1, 16.0.0.b8

What operating system are you using?

Other Linux

Operating System Version

5.14.12

What arch are you using?

x64

Last Known Working Electron version

unknown

Expected Behavior

Calling e.preventDefault in will-navigate event handler should prevent any navigation within webContents frame.

Actual Behavior

This does not work if the url being navigated to is an about: url, such as about:blank, about: Even random about urls like about:vh99fh2 will cause navigating away.

Testcase Gist URL

https://gist.github.com/mckravchyk/5673785c24dfcda54b648aa418b4cc40

Additional Information

No response

About this issue

  • Original URL
  • State: open
  • Created 3 years ago
  • Comments: 17 (4 by maintainers)

Commits related to this issue

Most upvoted comments

bump

repros in Electron 29-alpha

@ckerr Hi Charles - can this be closed as a dupe of the issue I linked to above and can that issue be tagged with the newer Electron version tags?