From fc6d9ba67aeeda22afcffe8bb7473c9d821b46f6 Mon Sep 17 00:00:00 2001 From: Slowlife01 Date: Sun, 2 Mar 2025 18:10:02 +0700 Subject: [PATCH] Fix: bookmark items not opening --- .../components/places/PlacesUIUtils-sys-mjs.patch | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/src/browser/components/places/PlacesUIUtils-sys-mjs.patch b/src/browser/components/places/PlacesUIUtils-sys-mjs.patch index fc32aa200..23c564fa0 100644 --- a/src/browser/components/places/PlacesUIUtils-sys-mjs.patch +++ b/src/browser/components/places/PlacesUIUtils-sys-mjs.patch @@ -1,5 +1,5 @@ diff --git a/browser/components/places/PlacesUIUtils.sys.mjs b/browser/components/places/PlacesUIUtils.sys.mjs -index fbdd6a34b12d4d957f7a2d9d95df0bfd65ba3f61..4d27f7fc108ca76e071707a737209bf5ea4ea07e 100644 +index fbdd6a34b12d4d957f7a2d9d95df0bfd65ba3f61..6021901b427d426078d9bf713d6995ad6332dbfa 100644 --- a/browser/components/places/PlacesUIUtils.sys.mjs +++ b/browser/components/places/PlacesUIUtils.sys.mjs @@ -58,6 +58,7 @@ class BookmarkState { @@ -157,12 +157,20 @@ index fbdd6a34b12d4d957f7a2d9d95df0bfd65ba3f61..4d27f7fc108ca76e071707a737209bf5 /** * Append transactions to update tags by given information. * -@@ -902,7 +1011,7 @@ export var PlacesUIUtils = { +@@ -902,8 +1011,15 @@ export var PlacesUIUtils = { aNode, aWhere, aWindow, - { aPrivate = false, userContextId = 0 } = {} -+ { aPrivate = false, userContextId = aWindow.ZenWorkspaces.getDefaultContainer() } = {} ++ { aPrivate = false, userContextId } = {} ) { ++ if (!userContextId) { ++ try { ++ let browserWindow = getBrowserWindow(aWindow); ++ userContextId = browserWindow.ZenWorkspaces.getDefaultContainer(); ++ } catch {} ++ } ++ if ( aNode && + lazy.PlacesUtils.nodeIsURI(aNode) &&