Skip to content

Commit 7f51fae

Browse files
committed
fix(core): allow wheel to bubble if not used by vf
1 parent adfc01d commit 7f51fae

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

packages/core/src/container/Viewport/Viewport.vue

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -333,7 +333,13 @@ onMounted(() => {
333333
function (this: any, event: WheelEvent, d: any) {
334334
// we still want to enable pinch zooming even if preventScrolling is set to false
335335
const invalidEvent = !preventScrolling.value && event.type === 'wheel' && !event.ctrlKey
336-
if (invalidEvent || isWrappedWithClass(event, noWheelClassName.value)) {
336+
337+
const zoomScroll = zoomKeyPressed.value || zoomOnScroll.value
338+
const pinchZoom = zoomOnPinch.value && event.ctrlKey
339+
340+
const scrollEventsDisabled = !zoomScroll && !panOnScroll.value && !pinchZoom && event.type === 'wheel'
341+
342+
if (scrollEventsDisabled || invalidEvent || isWrappedWithClass(event, noWheelClassName.value)) {
337343
return null
338344
}
339345

0 commit comments

Comments
 (0)