mirror of
https://github.com/flarum/core.git
synced 2025-08-08 17:36:38 +02:00
Fix double-fade of posts in post stream by moving fadeIn to css
This commit is contained in:
committed by
Franz Liedke
parent
d8d43d95e0
commit
f6dd87f72f
@@ -69,7 +69,7 @@ export default class PostStream extends Component {
|
||||
}
|
||||
|
||||
return (
|
||||
<div className="PostStream-item" {...attrs}>
|
||||
<div className="PostStream-item fade-in" {...attrs}>
|
||||
{content}
|
||||
</div>
|
||||
);
|
||||
@@ -368,6 +368,10 @@ export default class PostStream extends Component {
|
||||
* @param {jQuery} $item
|
||||
*/
|
||||
flashItem($item) {
|
||||
$item.addClass('flash').one('animationend webkitAnimationEnd', () => $item.removeClass('flash'));
|
||||
$item.addClass('flash').on('animationend webkitAnimationEnd', () => {
|
||||
if (event.animationName === 'fadeIn') {
|
||||
$item.removeClass('flash');
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
@@ -104,3 +104,18 @@
|
||||
.animation(pulsate 0.2s ease-in-out);
|
||||
.animation-iteration-count(1);
|
||||
}
|
||||
|
||||
@keyframes fadeIn {
|
||||
0% {opacity:0;}
|
||||
100% {opacity:1;}
|
||||
}
|
||||
|
||||
@-webkit-keyframes fadeIn {
|
||||
0% {opacity:0;}
|
||||
100% {opacity:1;}
|
||||
}
|
||||
|
||||
@-o-keyframes fadeIn {
|
||||
0% {opacity:0;}
|
||||
100% {opacity:1;}
|
||||
}
|
||||
|
Reference in New Issue
Block a user