aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorbobzel <zzzman@gmail.com>2022-04-28 00:08:36 -0400
committerbobzel <zzzman@gmail.com>2022-04-28 00:08:36 -0400
commitcf0f4d9fe144d05e8604d5224066b0e86879a3de (patch)
tree8b233744483ee8b57977132f84c807d589896bc2 /src
parentc6f2dc7f63b76ba0684e24aff8da138e00ae38ec (diff)
fixes for pushpin links to anchors on pdfviews
Diffstat (limited to 'src')
-rw-r--r--src/client/util/DocumentManager.ts4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/client/util/DocumentManager.ts b/src/client/util/DocumentManager.ts
index 9febd4302..412d5a169 100644
--- a/src/client/util/DocumentManager.ts
+++ b/src/client/util/DocumentManager.ts
@@ -178,7 +178,7 @@ export class DocumentManager {
});
}
const focusAndFinish = (didFocus: boolean) => {
- const finalTargetDoc = docView?.Document ?? resolvedTarget;
+ const finalTargetDoc = resolvedTarget;
if (originatingDoc?.isPushpin) {
if (!didFocus && !wasHidden) { // don't toggle the hidden state if the doc was already un-hidden as part of this document traversal
finalTargetDoc.hidden = !finalTargetDoc.hidden;
@@ -261,7 +261,7 @@ export class DocumentManager {
setTimeout(() => findView(delay + 200), 200);
}
};
- findView(0);
+ setTimeout(() => findView(0), 0);
}
} else { // there's no context view so we need to create one first and try again when that finishes
const finishFunc = () => this.jumpToDocument(targetDoc, true, createViewFunc, docContext, linkDoc, true /* if we don't find the target, we want to get rid of the context just created */, undefined, finished, originalTarget);