From 402538457eca0624e2e54fced95db497d45cbd7f Mon Sep 17 00:00:00 2001 From: Abe Jellinek Date: Thu, 18 Apr 2024 10:05:18 -0400 Subject: [PATCH] Reader: Add hook for setting zoom on iframe element (#4003) --- chrome/content/zotero/xpcom/reader.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/chrome/content/zotero/xpcom/reader.js b/chrome/content/zotero/xpcom/reader.js index d6ac3ab264..c872a636df 100644 --- a/chrome/content/zotero/xpcom/reader.js +++ b/chrome/content/zotero/xpcom/reader.js @@ -534,7 +534,11 @@ class ReaderInstance { if (!focused) { win.Zotero_Tabs.moveFocus("current"); } - } + }, + onSetZoom: (iframe, zoom) => { + iframe.browsingContext.textZoom = 1; + iframe.browsingContext.fullZoom = zoom; + }, }, this._iframeWindow, { cloneFunctions: true })); this._resolveInitPromise();