Skip to content

Commit 6508e17

Browse files
Update dependency electron to v22 (element-hq#480)
* Update dependency electron to v22 * Switch from new-window event to setWindowOpenHandler * Stop recommending libappindicator3-1, Electron 22 stops using it Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: Michael Telatynski <[email protected]>
1 parent 333361f commit 6508e17

File tree

5 files changed

+141
-156
lines changed

5 files changed

+141
-156
lines changed

element.io/nightly/control.template

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ Vendor: [email protected]
44
Architecture: amd64
55
Maintainer: [email protected]
66
Depends: libgtk-3-0, libnotify4, libnss3, libxss1, libxtst6, xdg-utils, libatspi2.0-0, libuuid1, libsecret-1-0, libasound2, libgbm1
7-
Recommends: libappindicator3-1, libsqlcipher0
7+
Recommends: libsqlcipher0
88
Section: net
99
Priority: extra
1010
Homepage: https://element.io/

element.io/release/control.template

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ Vendor: [email protected]
44
Architecture: amd64
55
Maintainer: [email protected]
66
Depends: libgtk-3-0, libnotify4, libnss3, libxss1, libxtst6, xdg-utils, libatspi2.0-0, libuuid1, libsecret-1-0, libasound2, libgbm1
7-
Recommends: libappindicator3-1, libsqlcipher0
7+
Recommends: libsqlcipher0
88
Replaces: riot-desktop (<< 1.7.0), riot-web (<< 1.7.0)
99
Breaks: riot-desktop (<< 1.7.0), riot-web (<< 1.7.0)
1010
Section: net

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@
7373
"babel-jest": "^29.0.0",
7474
"chokidar": "^3.5.2",
7575
"detect-libc": "^1.0.3",
76-
"electron": "^21",
76+
"electron": "^22.0.0",
7777
"electron-builder": "^23.6.0",
7878
"electron-builder-squirrel-windows": "^23.6.0",
7979
"electron-devtools-installer": "^3.1.1",

src/webcontents-handler.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -263,7 +263,11 @@ ipcMain.on('userDownloadAction', function(ev: IpcMainEvent, { id, open = false }
263263
});
264264

265265
export default (webContents: WebContents): void => {
266-
webContents.on('new-window', onWindowOrNavigate);
266+
webContents.setWindowOpenHandler((details) => {
267+
safeOpenURL(details.url);
268+
return { action: "deny" };
269+
});
270+
267271
webContents.on('will-navigate', (ev: Event, target: string): void => {
268272
if (target.startsWith("vector://")) return;
269273
return onWindowOrNavigate(ev, target);

0 commit comments

Comments
 (0)