From f6f3bdea54d4572fdf8c76f76a6ff3c73c798b85 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juho=20Fors=C3=A9n?= Date: Thu, 30 Jul 2026 14:06:33 +0000 Subject: [PATCH] Fix the error page 'Go back' button --- extension/src/webcat/response.ts | 2 ++ extension/src/webcat/ui.ts | 3 ++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/extension/src/webcat/response.ts b/extension/src/webcat/response.ts index c541ff4..7330c7e 100644 --- a/extension/src/webcat/response.ts +++ b/extension/src/webcat/response.ts @@ -444,6 +444,7 @@ export class ResponseValidator { errorpage( details, new WebcatError(WebcatErrorCode.File.MISSING, [pathname]), + true, ); return; } @@ -466,6 +467,7 @@ export class ResponseValidator { String(manifest_hash), String(Uint8ArrayToBase64Url(new Uint8Array(content_hash))), ]), + true, ); return; } diff --git a/extension/src/webcat/ui.ts b/extension/src/webcat/ui.ts index 7ce40f9..e9748a9 100644 --- a/extension/src/webcat/ui.ts +++ b/extension/src/webcat/ui.ts @@ -81,6 +81,7 @@ export function setErrorIcon(tabId: number) { export async function errorpage( details: Stateful, error?: WebcatError, + replace = !details.state.isFrame, ) { const tabIds = new Set(); const frameLookups = []; @@ -134,7 +135,7 @@ export async function errorpage( tabUpdates.push( browser.tabs.update(tabId, { url: errorPageUrl, - loadReplace: !details.state.isFrame, + loadReplace: replace, }), ), );