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]: will-navigate doesn't fire when navigating to about: URLs #21136
Comments
this is also an issue with Electron 7.1.2 |
Still a problem in Electron 10.1.2 |
Still a problem in Electron v11.3.0, and a fairly annoying one: I include links from external content in my app, and intercept them using If anybody clicks such a link, instead of either being blocked or opening in the system browser (both pretty reasonable) it blanks the entire app. As far as I can tell there's no other event or workaround for this available at present, so there's nothing I can do to protect against this at the Electron level. |
@pimterry Can you use |
@pushkin- no, that doesn't work either, it doesn't fire (presumably because there's no actual HTTP request involved). That's with this code: session.defaultSession.webRequest.onBeforeRequest((details, callback) => {
console.log("before request to", details.url);
callback({});
}); It logs every other request the app makes, but no request to |
Note that it's not just |
The issue still occurs in 16.0.4. |
Bump: |
This issue has been automatically marked as stale. If this issue is still affecting you, please leave any comment (for example, "bump"), and we'll keep it open. If you have any new additional information—in particular, if this is still reproducible in the latest version of Electron or in the beta—please include it with your comment! |
Bump: |
This issue has been automatically marked as stale. If this issue is still affecting you, please leave any comment (for example, "bump"), and we'll keep it open. If you have any new additional information—in particular, if this is still reproducible in the latest version of Electron or in the beta—please include it with your comment! |
bump |
This issue has been automatically marked as stale. If this issue is still affecting you, please leave any comment (for example, "bump"), and we'll keep it open. If you have any new additional information—in particular, if this is still reproducible in the latest version of Electron or in the beta—please include it with your comment! |
repros with v25.4.0 |
This issue has been automatically marked as stale. If this issue is still affecting you, please leave any comment (for example, "bump"), and we'll keep it open. If you have any new additional information—in particular, if this is still reproducible in the latest version of Electron or in the beta—please include it with your comment! |
repros in v27 |
This issue has been automatically marked as stale. If this issue is still affecting you, please leave any comment (for example, "bump"), and we'll keep it open. If you have any new additional information—in particular, if this is still reproducible in the latest version of Electron or in the beta—please include it with your comment! |
repros in v28 and v29-beta8 |
Preflight Checklist
Issue Details
Expected Behavior
Based on the documentation, I expect that navigating to
"about:blank"
will trigger the webcontent'swill-navigate
event.Actual Behavior
will-navigate
does not get triggered.The docs make no mention of
"about:blank"
being an exception, and so I expect thatwill-navigate
should get emitted when navigating to it.Either this is a documentation error, or it's a bug with
will-navigate
.To Reproduce
After
npm start
ing, in the devtools, runlocation = "https://google.com"
. Notice that we log it.Then run
location = "about:blank"
. Notice, that there's no log.The text was updated successfully, but these errors were encountered: