From bc8d4b46cdc836cbd59527ebfd1d891949d6e5ff Mon Sep 17 00:00:00 2001 From: bobzel Date: Fri, 29 Dec 2023 02:08:29 -0500 Subject: fixed displaying zoomed text annotations when following links/trails and for PDFs/Web pages with selected text. --- src/client/util/DocumentManager.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/client/util') diff --git a/src/client/util/DocumentManager.ts b/src/client/util/DocumentManager.ts index 0101c2bcb..0fab42895 100644 --- a/src/client/util/DocumentManager.ts +++ b/src/client/util/DocumentManager.ts @@ -307,7 +307,7 @@ export class DocumentManager { focused = focused || (nextFocus === undefined ? false : true); // keep track of whether focusing on a view needed to actually change anything const { childDocView, viewSpec } = await iterator(docView); if (!childDocView) return { viewSpec: options.anchorDoc ?? viewSpec ?? docView.Document, docView, contextView, focused }; - contextView = options.anchorDoc?.layout_unrendered ? childDocView : docView; + contextView = options.anchorDoc?.layout_unrendered && !childDocView.Document.layout_unrendered ? childDocView : docView; docView = childDocView; } }; @@ -325,7 +325,7 @@ export class DocumentManager { if (options.toggleTarget && (!options.didMove || docView.Document.hidden)) docView.Document.hidden = !docView.Document.hidden; if (options.effect) docView.Document[Animation] = options.effect; - if (options.zoomTextSelections && Doc.UnhighlightTimer && contextView && viewSpec.text_html) { + if (options.zoomTextSelections && Doc.UnhighlightTimer && contextView && targetDoc.text_html) { // if the docView is a text anchor, the contextView is the PDF/Web/Text doc contextView.htmlOverlayEffect = options.effect; contextView.textHtmlOverlayTime = options.zoomTime; -- cgit v1.2.3-70-g09d2