Skip to content

πŸ”₯ πŸ”₯ πŸ”₯ A Free & Self-hostable Airtable Alternative

fix: scroll fixes

DarkPhoenix270401f61a49ff36
diff --git a/packages/nc-gui/components/shared-view/Grid.vue b/packages/nc-gui/components/shared-view/Grid.vue
index 5c6689b6cd..7bfba440f8 100644
--- a/packages/nc-gui/components/shared-view/Grid.vue
+++ b/packages/nc-gui/components/shared-view/Grid.vue
@@ -31,10 +31,6 @@ useProvideSmartsheetLtarHelpers(meta)
useViewRowColorProvider({ shared: true })
-const route = useRoute()
-
-const disableToolbar = computed(() => route.query?.disableToolbar === 'true' || route.query?.disableTopbar === 'true')
-
if (signedIn.value) {
try {
await loadProject()
@@ -54,12 +50,7 @@ watch(
</script>
<template>
- <div
- :class="{
- 'pb-2': !disableToolbar,
- }"
- class="nc-container flex flex-col h-full"
- >
+ <div class="nc-container flex flex-col h-full">
<LazySmartsheetToolbar />
<LazySmartsheetGrid />
</div>
diff --git a/packages/nc-gui/components/smartsheet/grid/canvas/components/Scroller.vue b/packages/nc-gui/components/smartsheet/grid/canvas/components/Scroller.vue
index bcf04a4a85..27e52ff9df 100644
--- a/packages/nc-gui/components/smartsheet/grid/canvas/components/Scroller.vue
+++ b/packages/nc-gui/components/smartsheet/grid/canvas/components/Scroller.vue
@@ -156,7 +156,18 @@ const updateScroll = (vertical?: number, horizontal?: number) => {
const isWindowsOrLinux = ref(false)
const handleWheel = (e: WheelEvent) => {
- e.preventDefault()
+ const maxScrollY = contentWrapper.value.scrollHeight - wrapperRef.value.clientHeight
+ const maxScrollX = contentWrapper.value.scrollWidth - wrapperRef.value.clientWidth
+
+ // Only prevent default if we can actually scroll in the requested direction
+ const canScrollVertically = (e.deltaY > 0 && scrollTop.value < maxScrollY) || (e.deltaY < 0 && scrollTop.value > 0)
+ const canScrollHorizontally = (e.deltaX > 0 && scrollLeft.value < maxScrollX) || (e.deltaX < 0 && scrollLeft.value > 0)
+
+ if (canScrollVertically || canScrollHorizontally) {
+ e.preventDefault()
+ } else {
+ return
+ }
if (isWindowsOrLinux.value && e.shiftKey) {
// When Shift is pressed on Windows, treat vertical wheel movement as horizontal scroll