Skip to content

Commit 8346c23

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

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

  • packages/docusaurus-theme-common/src/components/Collapsible

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

Lines changed: 3 additions & 1 deletion
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)