Skip to content

Commit 28e8038

Browse files
committed
Update dependencies
Update versions of various dependencies. Notably electron from 32 to 34 since 34 improves wayland IME support.
1 parent 13f3818 commit 28e8038

File tree

4 files changed

+4786
-2277
lines changed

4 files changed

+4786
-2277
lines changed

app/main/menu.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ function getToolsSubmenu(): MenuItemConstructorOptions[] {
9494
accelerator:
9595
process.platform === "darwin" ? "Alt+Command+I" : "Ctrl+Shift+I",
9696
click(_item, focusedWindow) {
97-
if (focusedWindow) {
97+
if (focusedWindow && focusedWindow instanceof BrowserWindow) {
9898
focusedWindow.webContents.openDevTools({mode: "undocked"});
9999
}
100100
},
@@ -222,7 +222,7 @@ function getViewSubmenu(): MenuItemConstructorOptions[] {
222222
{
223223
label: t.__("Toggle Tray Icon"),
224224
click(_item, focusedWindow) {
225-
if (focusedWindow) {
225+
if (focusedWindow && focusedWindow instanceof BrowserWindow) {
226226
send(focusedWindow.webContents, "toggletray");
227227
}
228228
},
@@ -231,7 +231,7 @@ function getViewSubmenu(): MenuItemConstructorOptions[] {
231231
label: t.__("Toggle Sidebar"),
232232
accelerator: "CommandOrControl+Shift+S",
233233
click(_item, focusedWindow) {
234-
if (focusedWindow) {
234+
if (focusedWindow && focusedWindow instanceof BrowserWindow) {
235235
const newValue = !ConfigUtil.getConfigItem("showSidebar", true);
236236
send(focusedWindow.webContents, "toggle-sidebar", newValue);
237237
ConfigUtil.setConfigItem("showSidebar", newValue);
@@ -243,7 +243,7 @@ function getViewSubmenu(): MenuItemConstructorOptions[] {
243243
checked: ConfigUtil.getConfigItem("autoHideMenubar", false),
244244
visible: process.platform !== "darwin",
245245
click(_item, focusedWindow) {
246-
if (focusedWindow) {
246+
if (focusedWindow && focusedWindow instanceof BrowserWindow) {
247247
const newValue = !ConfigUtil.getConfigItem("autoHideMenubar", false);
248248
focusedWindow.autoHideMenuBar = newValue;
249249
focusedWindow.setMenuBarVisibility(!newValue);

app/renderer/js/components/webview.ts

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -184,8 +184,8 @@ export default class WebView {
184184
}
185185

186186
back(): void {
187-
if (this.getWebContents().canGoBack()) {
188-
this.getWebContents().goBack();
187+
if (this.getWebContents().navigationHistory.canGoBack()) {
188+
this.getWebContents().navigationHistory.goBack();
189189
this.focus();
190190
}
191191
}
@@ -194,12 +194,15 @@ export default class WebView {
194194
const $backButton = document.querySelector(
195195
"#actions-container #back-action",
196196
)!;
197-
$backButton.classList.toggle("disable", !this.getWebContents().canGoBack());
197+
$backButton.classList.toggle(
198+
"disable",
199+
!this.getWebContents().navigationHistory.canGoBack(),
200+
);
198201
}
199202

200203
forward(): void {
201-
if (this.getWebContents().canGoForward()) {
202-
this.getWebContents().goForward();
204+
if (this.getWebContents().navigationHistory.canGoForward()) {
205+
this.getWebContents().navigationHistory.goForward();
203206
}
204207
}
205208

0 commit comments

Comments
 (0)