aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorBob Zeleznik <zzzman@gmail.com>2020-04-05 01:46:36 -0400
committerBob Zeleznik <zzzman@gmail.com>2020-04-05 01:46:36 -0400
commit3436018343f4def809ba35d8944476dee9447a99 (patch)
tree5a7ff6514b649ee4eb4be2bd848f0adf5d3e57bf /src
parent50257b6f3ea91f9c8ac63985c9d81cb7546d9541 (diff)
from last
Diffstat (limited to 'src')
-rw-r--r--src/client/views/nodes/DocumentView.tsx2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/client/views/nodes/DocumentView.tsx b/src/client/views/nodes/DocumentView.tsx
index 853268d5b..aa3c1b3a2 100644
--- a/src/client/views/nodes/DocumentView.tsx
+++ b/src/client/views/nodes/DocumentView.tsx
@@ -325,7 +325,7 @@ export class DocumentView extends DocComponent<DocumentViewProps, Document>(Docu
const hackToCallFinishAfterFocus = () => {
setTimeout(() => finished?.(), 0); // finished() needs to be called right after hackToCallFinishAfterFocus(), but there's no callback for that so we use the hacky timeout.
return false; // we must return false here so that the zoom to the document is not reversed. If it weren't for needing to call finished(), we wouldn't need this function at all since not having it is equivalent to returning false
- }
+ };
this.props.addDocTab(doc, where) && this.props.focus(doc, true, undefined, hackToCallFinishAfterFocus); // add the target and focus on it.
return where !== "inPlace"; // return true to reset the initial focus&zoom (return false for 'inPlace' since resetting the initial focus&zoom will negate the zoom into the target)
};