diff options
| author | Naafiyan Ahmed <naafiyan@gmail.com> | 2022-07-12 12:07:38 -0400 |
|---|---|---|
| committer | Naafiyan Ahmed <naafiyan@gmail.com> | 2022-07-12 12:07:38 -0400 |
| commit | 31041d7a5b2c3699518ebb33ccab016af0acd579 (patch) | |
| tree | 8d8651ef3bcf9e6fee0c55c598ec5c356dbcc05f /src/client/views/nodes/DocumentView.tsx | |
| parent | 39cf91aadee5f448e1a7a0a07da9e769d6e242fa (diff) | |
| parent | 0906eab4135db844dc45a20d33f84e7439461c9b (diff) | |
merged master
Diffstat (limited to 'src/client/views/nodes/DocumentView.tsx')
| -rw-r--r-- | src/client/views/nodes/DocumentView.tsx | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/client/views/nodes/DocumentView.tsx b/src/client/views/nodes/DocumentView.tsx index 2ea976813..360a9b242 100644 --- a/src/client/views/nodes/DocumentView.tsx +++ b/src/client/views/nodes/DocumentView.tsx @@ -469,7 +469,7 @@ export class DocumentViewInternal extends DocComponent<DocumentViewInternalProps }); // after a timeout, the right _componentView should have been created, so call it to update its view spec values setTimeout(() => this._componentView?.setViewSpec?.(anchor, LinkDocPreview.LinkInfo ? true : false)); - const focusSpeed = this._componentView?.scrollFocus?.(anchor, !options?.instant || !LinkDocPreview.LinkInfo); // bcz: smooth parameter should really be passed into focus() instead of inferred here + const focusSpeed = this._componentView?.scrollFocus?.(anchor, options?.instant === false || !LinkDocPreview.LinkInfo); // bcz: smooth parameter should really be passed into focus() instead of inferred here const endFocus = focusSpeed === undefined ? options?.afterFocus : async (moved: boolean) => options?.afterFocus ? options?.afterFocus(true) : ViewAdjustment.doNothing; this.props.focus(options?.docTransform ? anchor : this.rootDoc, { ...options, afterFocus: (didFocus: boolean) => |
