Skip to content

fix: prevent responsive wrappers from swallowing horizontal scroll events (#1392) - #1396

Merged
jbetancur merged 1 commit into
jbetancur:masterfrom
pardeep1916P:fix/horizontal-scroll-containment-1392
Sep 28, 2026
Merged

jbetancur merged 1 commit into
jbetancur:masterfrom
pardeep1916P:fix/horizontal-scroll-containment-1392

Conversation

@pardeep1916P

Copy link
Copy Markdown
Contributor

Summary

Fixes #1392

This PR removes overscroll-behavior-x: contain; from .rdt_responsiveWrapperScroll and .rdt_responsiveWrapperFixed in src/DataTable.css.

Problem & Root Cause

Previously, .rdt_responsiveWrapperScroll and .rdt_responsiveWrapperFixed had overscroll-behavior-x: contain; defined. Because .rdt_responsiveWrapper covers the table bounds (100% width), any horizontal scrolling/swiping gesture initiated while hovering over or touching the table was trapped and prevented from bubbling / chaining to parent scrollable containers or the window (especially noticeable on mobile touch or trackpad horizontal swipe). When the table had no horizontal overflow or reached its scroll boundaries, outer horizontal scrolling was swallowed.

Solution

  • Removed overscroll-behavior-x: contain; from .rdt_responsiveWrapperScroll and .rdt_responsiveWrapperFixed.
  • Reverting to default auto allows natural scroll chaining to ancestor containers.
  • Local table horizontal overflow scrolling and mobile touch panning (touch-action: pan-x pan-y; and -webkit-overflow-scrolling: touch;) remain fully functional.

Verification

  • Passed full test suite (npm test — 718 tests passing).
  • Passed TypeScript check (npm run typecheck).

Copilot AI lite review requested due to automatic review settings September 26, 2026 14:59
@netlify

netlify Bot commented Sep 26, 2026 •

Copy link
Copy Markdown

✅ Deploy Preview for react-data-table-component ready!

Name Link
🔨 Latest commit d8441be
🔍 Latest deploy log https://app.netlify.com/projects/react-data-table-component/deploys/6ab7ddc798c1960008f812f9
😎 Deploy Preview https://deploy-preview-1396--react-data-table-component.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
🤖 Make changes Run an agent on this branch

To edit notification comments on pull requests, go to your Netlify project configuration.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot review overview

🟢 Approval recommended

No unresolved review issues were identified.

Review effort: Lite
Findings: None

What changed in this PR

Fixes horizontal scroll gestures being trapped by responsive table wrappers.

Changes:

  • Removed horizontal overscroll containment from responsive and fixed wrappers.
  • Preserved local table scrolling and touch panning.
File Description
src/​DataTable.css Restores natural horizontal scroll chaining.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@jbetancur jbetancur self-assigned this Sep 28, 2026
@jbetancur
jbetancur merged commit 9b57bd8 into jbetancur:master Sep 28, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[BUG]: horizontal scrolling not working when cursor/pointer on table

3 participants