Skip to content

Commit 952e5b4

Browse files
committed
Fix displaying out-of-scope URL bar in Firefox 147
1 parent e50a349 commit 952e5b4

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

native/userchrome/profile/chrome/pwa/content/browser.sys.mjs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -389,7 +389,10 @@ class PwaBrowser {
389389
!xPref.get('extensions.webextensions.restrictedDomains').split(',').includes(uri.host);
390390

391391
// Handle hiding/showing URL bar when the URL is out-of-scope
392-
hookFunction(window.gURLBar, 'setURI', null, (_, [uri]) => {
392+
hookFunction(window.gURLBar, 'setURI', null, (_, [args]) => {
393+
// Handle both passing URI directly and as a named options object
394+
let uri = args?.uri ?? args;
395+
393396
// Check whether the URL is in scope
394397
const canLoad = this.canLoad(uri);
395398
let displayBar = !canLoad && !uri.spec.startsWith('about:firefoxview');

0 commit comments

Comments
 (0)