diff --git a/packages/frontend/src/ui/deck.vue b/packages/frontend/src/ui/deck.vue index bd5d5beb84..988fda1c2f 100644 --- a/packages/frontend/src/ui/deck.vue +++ b/packages/frontend/src/ui/deck.vue @@ -4,12 +4,13 @@
-
+
@@ -196,15 +198,14 @@ const onContextmenu = (ev) => { }], ev); }; -document.documentElement.style.overflowY = 'hidden'; -document.documentElement.style.scrollBehavior = 'auto'; -window.addEventListener('wheel', (ev) => { - if (ev.target === columnsEl && ev.deltaX === 0) { - columnsEl.scrollLeft += ev.deltaY; - } else if (getScrollContainer(ev.target as HTMLElement) == null && ev.deltaX === 0) { +function onWheel(ev: WheelEvent) { + if (ev.deltaX === 0) { columnsEl.scrollLeft += ev.deltaY; } -}); +} + +document.documentElement.style.overflowY = 'hidden'; +document.documentElement.style.scrollBehavior = 'auto'; loadDeck(); diff --git a/packages/frontend/src/ui/deck/column.vue b/packages/frontend/src/ui/deck/column.vue index c8d6744a37..f6c5c8de46 100644 --- a/packages/frontend/src/ui/deck/column.vue +++ b/packages/frontend/src/ui/deck/column.vue @@ -12,6 +12,7 @@ @dragstart="onDragstart" @dragend="onDragend" @contextmenu.prevent.stop="onContextmenu" + @wheel="emit('headerWheel', $event)" > @@ -56,6 +57,10 @@ const props = withDefaults(defineProps<{ naked: false, }); +const emit = defineEmits<{ + (ev: 'headerWheel', ctx: WheelEvent): void; +}>(); + let body = $shallowRef(); let dragging = $ref(false);