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

[XGrid] Fix column resize on touch devices #2089

Merged
merged 2 commits into from Jul 8, 2021

Conversation

m4theushw
Copy link
Member

@m4theushw m4theushw commented Jul 7, 2021

@m4theushw m4theushw changed the title [DataGrid] Fix column resize on touch devices [XGrid] Fix column resize on touch devices Jul 7, 2021
@m4theushw m4theushw added bug 🐛 Something doesn't work components: XGrid labels Jul 7, 2021
@m4theushw m4theushw requested a review from a team July 7, 2021 02:43
@m4theushw m4theushw added regression A bug, but worse and removed bug 🐛 Something doesn't work labels Jul 7, 2021
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.

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.

Looks good

@@ -36,6 +37,10 @@ let cachedSupportsTouchActionNone = false;
// Over 80% of the iOS phones are compatible
// in August 2020.
function doesSupportTouchActionNone(): boolean {
// The document is not defined in the server-side
if (typeof document === 'undefined') {
Copy link
Member

Choose a reason for hiding this comment

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

I wonder if we will need an abstraction from the utils package to determine if we are on the server or not. Sometimes poeple add global and break our heuristics. e.g. https://github.com/mui-org/material-ui/blob/0230df94ca877fdd63a42c3e276f75c3a4316eea/packages/material-ui-utils/src/useEnhancedEffect.js#L3. Anyway, not important.

Copy link
Member Author

Choose a reason for hiding this comment

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

I'm checking the document because it's the most obvious ("document is not defined" error), but all code examples I found in StackOverflow to fix this problem looks at the window. I'll leave as it is.

@m4theushw m4theushw merged commit 9382c9d into mui:master Jul 8, 2021
@m4theushw m4theushw deleted the column-resize-regression branch July 8, 2021 12:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
regression A bug, but worse
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[XGrid] Column resizing not working on touch devices
3 participants