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
[core] Utilize CSS.supports
in SliderUnstyled
component
#27724
[core] Utilize CSS.supports
in SliderUnstyled
component
#27724
Conversation
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.
Much cleaner and the comment is 👍🏻
We'll probably want to do some browserstack testing with Edge (chromium based).
packages/material-ui-unstyled/src/SliderUnstyled/SliderUnstyled.js
Outdated
Show resolved
Hide resolved
packages/material-ui-unstyled/src/SliderUnstyled/SliderUnstyled.js
Outdated
Show resolved
Hide resolved
…d.js Co-authored-by: Sebastian Silbermann <silbermann.sebastian@gmail.com>
…d.js Co-authored-by: Sebastian Silbermann <silbermann.sebastian@gmail.com>
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. Will do some manual testing later
If it goes in, it would be great to update https://github.com/mui-org/material-ui-x/blob/3d30ee895675b47db158e0e4543227e8508a4634/packages/grid/_modules_/grid/hooks/features/columnResize/useGridColumnResize.tsx#L31 too (mui-x) |
cachedSupportsTouchActionNone = CSS.supports('touch-action', 'none'); | ||
} | ||
|
||
cachedSupportsTouchActionNone = true; |
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.
We need to set this in an else
branch. Otherwise it always overrides the actual value.
Good news is that we can actually test this behavior in browserstack.
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.
Verified manually on browserstack with a incorrect and correct implementation. One less reflow 👍🏻
Utilize the
CSS.supports
method inSliderUnstyled
component to check iftouch-action
is supported.