Skip to content

Commit

Permalink
fix collapsible with reduced motion
Browse files Browse the repository at this point in the history
  • Loading branch information
slorber committed Apr 19, 2023
1 parent 9c7e29a commit df1c713
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,9 @@ https://github.com/mui-org/material-ui/blob/e724d98eba018e55e1a684236a2037e24bcf
*/
function getAutoHeightDuration(height: number) {
if (userPrefersReducedMotion()) {
return 0;
// Not using 0 because it prevents onTransitionEnd to fire :/
// See bug https://github.com/facebook/docusaurus/discussions/8905#discussioncomment-5663928
return 1;
}
const constant = height / 36;
return Math.round((4 + 15 * constant ** 0.25 + constant / 5) * 10);
Expand Down

0 comments on commit df1c713

Please sign in to comment.