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

[DataGrid] Fix iOS issue when scrolling left #439

Merged

Conversation

DanailH
Copy link
Member

@DanailH DanailH commented Oct 13, 2020

This PR fixes an iOS scroll stretching issue that is visible when the user tries to scroll left while the grid is at the left position of 0. The issue occurs because when you scroll on an IOS device a scroll event is fired even if there is no space to scroll in that direction (scroll bouncing).

The fix is achieved by checking the event.target.scrollLeft and if it is < 0 prevent the update of the viewport.

Fixes #269

@oliviertassinari oliviertassinari changed the title [DataGrid] Fix IOS issue when scrolling left [DataGrid] Fix iOS issue when scrolling left Oct 13, 2020
@oliviertassinari oliviertassinari added bug 🐛 Something doesn't work component: data grid This is the name of the generic UI component, not the React module! labels Oct 13, 2020
Copy link
Member

@oliviertassinari oliviertassinari left a comment

Choose a reason for hiding this comment

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

What about the vertical scrolling?

I have left a couple of boy scout comments

Copy link
Member

@oliviertassinari oliviertassinari left a comment

Choose a reason for hiding this comment

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

need to handle vertical scrolling too

@DanailH
Copy link
Member Author

DanailH commented Oct 15, 2020

need to handle vertical scrolling too

I added additional check for vertical scrolling. It suffered from the same problem.

Copy link
Member

@oliviertassinari oliviertassinari left a comment

Choose a reason for hiding this comment

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

I have observed 4 other different rendering issues on iOS, but that for another day.

@oliviertassinari oliviertassinari merged commit 5fc0f76 into mui:master Oct 15, 2020
dtassone pushed a commit to dtassone/material-ui-x that referenced this pull request Nov 9, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug 🐛 Something doesn't work component: data grid This is the name of the generic UI component, not the React module!
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[DataGrid] iOS scroll stretching issue
3 participants