From 1e1a458addc1153858ab9a2d7b575438a90c679b Mon Sep 17 00:00:00 2001 From: Elian Doran Date: Fri, 12 Sep 2025 15:39:30 +0300 Subject: [PATCH] chore(collections/board): bring back scrolling inside columns --- .../client/src/widgets/collections/board/column.tsx | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/apps/client/src/widgets/collections/board/column.tsx b/apps/client/src/widgets/collections/board/column.tsx index cfca7b28f..b1e6559ed 100644 --- a/apps/client/src/widgets/collections/board/column.tsx +++ b/apps/client/src/widgets/collections/board/column.tsx @@ -9,6 +9,7 @@ import Icon from "../../react/Icon"; import { t } from "../../../services/i18n"; import BoardApi from "./api"; import Card from "./card"; +import { JSX } from "preact/jsx-runtime"; interface DragContext { column: string; @@ -42,6 +43,17 @@ export default function Column({ openColumnContextMenu(api, e, column); }, [ api, column ]); + /** Allow using mouse wheel to scroll inside card, while also maintaining column horizontal scrolling. */ + const handleScroll = useCallback((event: JSX.TargetedWheelEvent) => { + const el = event.currentTarget; + if (!el) return; + + const needsScroll = el.scrollHeight > el.clientHeight; + if (needsScroll) { + event.stopPropagation(); + } + }, []); + useEffect(() => { editorRef.current?.focus(); }, [ isEditing ]); @@ -52,6 +64,7 @@ export default function Column({ onDragOver={handleDragOver} onDragLeave={handleDragLeave} onDrop={handleDrop} + onWheel={handleScroll} >