From 911bd3d5e395afa6b7eaf3bdf957b27325c3e46a Mon Sep 17 00:00:00 2001 From: bobzel Date: Thu, 23 Mar 2023 18:18:12 -0400 Subject: fixed outer freefrom from scrolling when scrolling the new fields list in a SchemaView --- .../collections/collectionSchema/CollectionSchemaView.tsx | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/client/views/collections/collectionSchema/CollectionSchemaView.tsx b/src/client/views/collections/collectionSchema/CollectionSchemaView.tsx index 839a5f911..4fc4c4881 100644 --- a/src/client/views/collections/collectionSchema/CollectionSchemaView.tsx +++ b/src/client/views/collections/collectionSchema/CollectionSchemaView.tsx @@ -774,7 +774,18 @@ export class CollectionSchemaView extends CollectionSubView() { })}> + new field -
+
+ r?.addEventListener( + 'wheel', // if scrollTop is 0, then don't let wheel trigger scroll on any container (which it would since onScroll won't be triggered on this) + (e: WheelEvent) => { + if (!r.scrollTop && e.deltaY <= 0) e.preventDefault(); + e.stopPropagation(); + }, + { passive: false } + ) + }> {this._menuOptions.map(key => (