From b2acb5e3395583cc418b119c8e0433f3a62890bb Mon Sep 17 00:00:00 2001 From: Martynas Bagdonas Date: Fri, 21 May 2021 16:01:43 +0300 Subject: [PATCH] Fix missing title in PDF reader standalone window --- chrome/content/zotero/xpcom/reader.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/chrome/content/zotero/xpcom/reader.js b/chrome/content/zotero/xpcom/reader.js index bcfacbc18c..cb96fef59e 100644 --- a/chrome/content/zotero/xpcom/reader.js +++ b/chrome/content/zotero/xpcom/reader.js @@ -56,6 +56,7 @@ class ReaderInstance { } this.state = state; this._itemID = item.id; + // Set `ReaderTab` title as fast as possible this.updateTitle(); let path = await item.getFilePathAsync(); let buf = await OS.File.read(path, {}); @@ -77,6 +78,8 @@ class ReaderInstance { bottomPlaceholderHeight: this._bottomPlaceholderHeight, localizedStrings: Zotero.Intl.getPrefixedStrings('pdfReader') }, [buf]); + // Set title once again, because `ReaderWindow` isn't loaded the first time + this.updateTitle(); return true; }