From f05d6fe0e0bfea59825af68e8687bbf665876d55 Mon Sep 17 00:00:00 2001 From: Abe Jellinek Date: Thu, 26 May 2022 10:44:27 -0600 Subject: [PATCH] fx-compat: Fix basicViewer for http(s):// URLs maychangeremoteness="true" is required to successfully load pages from the web even though we never actually change remoteness. https://searchfox.org/comm-central/rev/2cf3a09a0127fe73e932c5ee793986f3bed2ccd2/mail/base/content/aboutMessage.xhtml#118 --- chrome/content/zotero/standalone/basicViewer.js | 8 ++++---- chrome/content/zotero/standalone/basicViewer.xhtml | 3 ++- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/chrome/content/zotero/standalone/basicViewer.js b/chrome/content/zotero/standalone/basicViewer.js index e0381f3a9d..b3eef89278 100644 --- a/chrome/content/zotero/standalone/basicViewer.js +++ b/chrome/content/zotero/standalone/basicViewer.js @@ -48,10 +48,10 @@ window.addEventListener("load", /*async */function() { //browser.docShellIsActive = false; // align page title with title of shown document - browser.addEventListener("pageshow", function() { - document.title = browser.contentDocument.title || browser.contentDocument.location.href; - }, false); - + browser.addEventListener('pagetitlechanged', () => { + document.title = browser.contentTitle || browser.currentURI.spec; + }); + // Load URI passed in as nsISupports .data via openWindow() browser.loadURI( window.arguments[0], diff --git a/chrome/content/zotero/standalone/basicViewer.xhtml b/chrome/content/zotero/standalone/basicViewer.xhtml index df48975e6b..7d29229c79 100644 --- a/chrome/content/zotero/standalone/basicViewer.xhtml +++ b/chrome/content/zotero/standalone/basicViewer.xhtml @@ -170,7 +170,8 @@ type="content" flex="1" remote="false" - disableglobalhistory="true"/> + disableglobalhistory="true" + maychangeremoteness="true"/>