Skip to content

[data grid] Scrollbar not visible on iOS #22386

Description

@oliviertassinari

Steps to reproduce

Steps:

  1. Open https://mui.com/x/react-data-grid/#pro-version

Current behavior

Screen.Recording.2026-05-10.at.01.53.10.mov

Expected behavior

Screen.Recording.2026-05-10.at.01.52.35.mov

I didn't look much, but here is the starts of a fix:

diff --git a/packages/x-data-grid/src/components/virtualization/GridVirtualScroller.tsx b/packages/x-data-grid/src/components/virtualization/GridVirtualScroller.tsx
index ef76519e57..89670997fd 100644
--- a/packages/x-data-grid/src/components/virtualization/GridVirtualScroller.tsx
+++ b/packages/x-data-grid/src/components/virtualization/GridVirtualScroller.tsx
@@ -66,19 +66,21 @@ const Scroller = styled('div', {
   overflow: 'scroll',
   display: 'flex',
   flexDirection: 'column',
-
-  scrollbarWidth: 'none' /* Firefox */,
-  '&::-webkit-scrollbar': {
-    display: 'none' /* Safari and Chrome */,
+  scrollbarWidth: 'none',
+  '&::-webkit-scrollbar': { // Legacy Safari and Chrome
+    display: 'none',
+  },
+  '@media (hover: none)': {
+    scrollbarWidth: 'auto',
+    '&::-webkit-scrollbar': {
+      display: 'block',
+    },
   },
-
   '@media print': {
     overflow: 'hidden',
   },
-
   // See https://github.com/mui/mui-x/issues/10547
   zIndex: 0,
-
   // Prevent overscroll bounce from revealing content behind pinned column shadows on macOS.
   overscrollBehaviorX: ownerState.hasPinnedColumns ? 'none' : undefined,
 }));

I'm not convinced its correct though because

Context

No response

Your environment

npx @mui/envinfo
  Don't forget to mention which browser you used.
  Output from `npx @mui/envinfo` goes here.

Search keywords: -

Metadata

Metadata

Assignees

Labels

browser: SafariAffects or fixes behavior in Apple Safari.mobileTargets mobile platform.scope: data gridChanges related to the data grid.type: bugIt doesn't behave as expected.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions