Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 8346c23

Browse files
committedMay 15, 2023
fix(theme-common): fix collapsible component with prefers-reduced-motion (#8906)
1 parent aa49226 commit 8346c23

File tree

1 file changed

+3
-1
lines changed
  • packages/docusaurus-theme-common/src/components/Collapsible

1 file changed

+3
-1
lines changed
 

‎packages/docusaurus-theme-common/src/components/Collapsible/index.tsx

+3-1
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,9 @@ https://github.com/mui-org/material-ui/blob/e724d98eba018e55e1a684236a2037e24bcf
7777
*/
7878
function getAutoHeightDuration(height: number) {
7979
if (userPrefersReducedMotion()) {
80-
return 0;
80+
// Not using 0 because it prevents onTransitionEnd to fire and bubble up :/
81+
// See https://github.com/facebook/docusaurus/pull/8906
82+
return 1;
8183
}
8284
const constant = height / 36;
8385
return Math.round((4 + 15 * constant ** 0.25 + constant / 5) * 10);

0 commit comments

Comments
 (0)
Please sign in to comment.