diff options
| author | bobzel <zzzman@gmail.com> | 2025-05-05 12:29:18 -0400 |
|---|---|---|
| committer | bobzel <zzzman@gmail.com> | 2025-05-05 12:29:18 -0400 |
| commit | 8d15a14a1f230b12b8ed90dad5650f3c8857feb6 (patch) | |
| tree | 47c2f8cf1277433d9845782ae8e234edbb614278 /src/client/views/collections/CollectionStackingView.tsx | |
| parent | 54b8c7e9ec258fd43ec523aaf3d967a646022cee (diff) | |
| parent | d4659e2bd3ddb947683948083232c26fb1227f39 (diff) | |
Merge branch 'master' into task_nodes_aarav
Diffstat (limited to 'src/client/views/collections/CollectionStackingView.tsx')
| -rw-r--r-- | src/client/views/collections/CollectionStackingView.tsx | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/src/client/views/collections/CollectionStackingView.tsx b/src/client/views/collections/CollectionStackingView.tsx index f11e646cc..be570564b 100644 --- a/src/client/views/collections/CollectionStackingView.tsx +++ b/src/client/views/collections/CollectionStackingView.tsx @@ -55,7 +55,6 @@ export class CollectionStackingView extends CollectionSubView<Partial<collection _docXfs: { height: () => number; width: () => number; stackedDocTransform: () => Transform }[] = []; // Doesn't look like this field is being used anywhere. Obsolete? _columnStart: number = 0; - _oldWheel: HTMLElement | null = null; @observable _refList: HTMLElement[] = []; // map of node headers to their heights. Used in Masonry @@ -721,7 +720,6 @@ export class CollectionStackingView extends CollectionSubView<Partial<collection return this._props.isContentActive() === false ? 'none' : undefined; } - onPassiveWheel = (e: WheelEvent) => this._props.isContentActive() && e.stopPropagation(); render() { TraceMobx(); const editableViewProps = { @@ -744,10 +742,7 @@ export class CollectionStackingView extends CollectionSubView<Partial<collection ref={ele => { this._masonryGridRef = ele; this.createDashEventsTarget(ele); // so the whole grid is the drop target? - this._oldWheel?.removeEventListener('wheel', this.onPassiveWheel); - this._oldWheel = ele; - // prevent wheel events from passively propagating up through containers and prevents containers from preventDefault which would block scrolling - ele?.addEventListener('wheel', this.onPassiveWheel, { passive: false }); + this.fixWheelEvents(ele, this._props.isContentActive); }} style={{ overflowY: this.isContentActive() ? 'auto' : 'hidden', |
