Skip to content

Commit c433d94

Browse files
author
Alona
committed
fix(component): fix animation error in post-collapsible when inside inactive tabs
1 parent 69e9451 commit c433d94

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

packages/components/src/components/post-collapsible/post-collapsible.tsx

+4-1
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,10 @@ export class PostCollapsible {
7777

7878
await animation.finished;
7979

80-
animation.commitStyles();
80+
const isVisible = this.host.offsetParent || this.host.offsetWidth || this.host.offsetHeight;
81+
if (isVisible) {
82+
animation.commitStyles();
83+
}
8184

8285
return open;
8386
}

0 commit comments

Comments
 (0)