-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Conversation
a82cc39
to
8ea4ff6
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When do we remove this line? https://github.com/mui-org/material-ui-x/pull/1989/files#r664813310
8ea4ff6
to
d1732e3
Compare
There was a problem hiding this 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') { |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
Fixes #2007
Preview: https://deploy-preview-2089--material-ui-x.netlify.app/components/data-grid/demo/