Fix bounce effect bug when switching view modes
This commit is contained in:
parent
8efc7a226e
commit
c609ba0194
1 changed files with 8 additions and 0 deletions
|
@ -641,6 +641,14 @@ function StatusThread({ id, closeLink = '/', instance: propInstance }) {
|
||||||
} ${initialPageState.current === 'status' ? 'slide-in' : ''} ${
|
} ${initialPageState.current === 'status' ? 'slide-in' : ''} ${
|
||||||
viewMode ? `deck-view-${viewMode}` : ''
|
viewMode ? `deck-view-${viewMode}` : ''
|
||||||
}`}
|
}`}
|
||||||
|
onAnimationEnd={(e) => {
|
||||||
|
// Fix the bounce effect when switching viewMode
|
||||||
|
// `slide-in` animation kicks in when switching viewMode
|
||||||
|
if (initialPageState.current === 'status') {
|
||||||
|
// e.target.classList.remove('slide-in');
|
||||||
|
initialPageState.current = null;
|
||||||
|
}
|
||||||
|
}}
|
||||||
>
|
>
|
||||||
<header
|
<header
|
||||||
class={`${heroInView ? 'inview' : ''} ${
|
class={`${heroInView ? 'inview' : ''} ${
|
||||||
|
|
Loading…
Add table
Reference in a new issue