mirror of
https://github.com/electron/electron.git
synced 2026-04-10 03:01:51 -04:00
Co-authored-by: Samuel Attard <samuel.r.attard@gmail.com> Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
This commit is contained in:
@@ -30,9 +30,11 @@ BrowserWindow.prototype._init = function () {
|
||||
// Though this hack is only needed on macOS when the app is launched from
|
||||
// Finder, we still do it on all platforms in case of other bugs we don't
|
||||
// know.
|
||||
this.webContents.once('load-url', function () {
|
||||
this.focus();
|
||||
});
|
||||
if (this.webContents._initiallyShown) {
|
||||
this.webContents.once('load-url', function () {
|
||||
this.focus();
|
||||
});
|
||||
}
|
||||
|
||||
// Redirect focus/blur event to app instance too.
|
||||
this.on('blur', (event) => {
|
||||
|
||||
Reference in New Issue
Block a user