aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/client/views/collections/TabDocView.tsx3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/client/views/collections/TabDocView.tsx b/src/client/views/collections/TabDocView.tsx
index 5bff1cdc3..5acf825f1 100644
--- a/src/client/views/collections/TabDocView.tsx
+++ b/src/client/views/collections/TabDocView.tsx
@@ -326,6 +326,7 @@ export class TabDocView extends React.Component<TabDocViewProps> {
</div>
</div>;
}
+ focusFunc = (doc: Doc, willZoom: boolean, scale?: number, afterFocus?: () => void) => afterFocus?.();
setView = action((view: DocumentView) => this._view = view);
@computed get docView() {
TraceMobx();
@@ -348,7 +349,7 @@ export class TabDocView extends React.Component<TabDocViewProps> {
renderDepth={0}
parentActive={returnTrue}
whenActiveChanged={emptyFunction}
- focus={(doc: Doc, willZoom: boolean, scale?: number, afterFocus?: () => void) => afterFocus?.()}
+ focus={this.focusFunc}
backgroundColor={CollectionDockingView.Instance.props.backgroundColor}
addDocTab={this.addDocTab}
pinToPres={TabDocView.PinDoc}