diff options
| author | bobzel <zzzman@gmail.com> | 2024-09-02 09:26:37 -0400 |
|---|---|---|
| committer | bobzel <zzzman@gmail.com> | 2024-09-02 09:26:37 -0400 |
| commit | cda69e48361fce8d71a4dc66edd9dd976a27f52d (patch) | |
| tree | 82b9a1a5967ae88a9534f89f7eaed3aeb289652f /src/client/views/collections/collectionFreeForm/CollectionFreeFormPannableContents.tsx | |
| parent | c01828308714874589d1f60c33ca59df4c656c0c (diff) | |
| parent | a958577d4c27b276aa37484e3f895e196138b17c (diff) | |
Merge branch 'master' into alyssa-starter
Diffstat (limited to 'src/client/views/collections/collectionFreeForm/CollectionFreeFormPannableContents.tsx')
| -rw-r--r-- | src/client/views/collections/collectionFreeForm/CollectionFreeFormPannableContents.tsx | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/client/views/collections/collectionFreeForm/CollectionFreeFormPannableContents.tsx b/src/client/views/collections/collectionFreeForm/CollectionFreeFormPannableContents.tsx index e543b4008..bc9dd022c 100644 --- a/src/client/views/collections/collectionFreeForm/CollectionFreeFormPannableContents.tsx +++ b/src/client/views/collections/collectionFreeForm/CollectionFreeFormPannableContents.tsx @@ -54,8 +54,8 @@ export class CollectionFreeFormPannableContents extends ObservableReactComponent <div className={'collectionfreeformview' + (this._props.viewDefDivClick ? '-viewDef' : '-none')} onScroll={e => { - const target = e.target as any; - if (getComputedStyle(target)?.overflow === 'visible') { + const { target } = e; + if (target instanceof Element && getComputedStyle(target)?.overflow === 'visible') { target.scrollTop = target.scrollLeft = 0; // if collection is visible, scrolling messes things up since there are no scroll bars } }} |
