Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[data grid] improve scrollbar deadzone with overlay scrollbars #15961

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

lauri865
Copy link
Contributor

@lauri865 lauri865 commented Dec 20, 2024

On OS X and potentially other platforms that hide scrollbars when not scrolling, virtual scrollbars are effectively overlapping. When scrollbar is scrolled to the end, there's a dead zone where you cannot drag the scroll handle at all until you manually scroll it out of the dead zone, and scrolling works in only in one direction (whichever comes last in the DOM, currently horizontal scrollbar).

This PR adds two improvements:

  1. Vertical scrollbar comes after horizontal scrollbar, making it render on top. It's more likely that there's more vertical content than horizontal content, hence the handle is smaller and the issue is more pronounced (it's more likely that the whole scroll handle is hidden in the dead zone).
  2. On hovering scroll track, the zIndex is incremented by +1, making the deadzone go away. You still cannot scroll from the deadzone itself in one of the directions (previously vertically, now horizontally), but the it's at least an easy win for now, and if you start hovering/scrolling outside of the dead zone, it works in both directions now.

@lauri865
Copy link
Contributor Author

@mui-bot
Copy link

mui-bot commented Dec 20, 2024

Deploy preview: https://deploy-preview-15961--material-ui-x.netlify.app/

Generated by 🚫 dangerJS against 4288597

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.

2 participants