mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/Popups
synced 2024-09-25 11:17:24 +00:00
Replace animationend with setTimeout
Bug: 63253 Change-Id: Id4b998ad88bf27da8114f8194464bea8a11a0504
This commit is contained in:
parent
783ae1ead7
commit
cb41c8e6ff
|
@ -11,6 +11,13 @@
|
|||
-moz-animation: @arguments;
|
||||
-o-animation: @arguments;
|
||||
animation: @arguments;
|
||||
|
||||
/* Leave the element in its final animation state */
|
||||
-webkit-animation-fill-mode: forwards; /* Chrome 16+, Safari 4+ */
|
||||
-moz-animation-fill-mode: forwards; /* FF 5+ */
|
||||
-o-animation-fill-mode: forwards; /* not implemented yet */
|
||||
-ms-animation-fill-mode: forwards; /* IE 10+ */
|
||||
animation-fill-mode: forwards; /* when the spec is finished */
|
||||
}
|
||||
|
||||
@-webkit-keyframes mwe-popups-fade-in {
|
||||
|
|
|
@ -350,16 +350,16 @@
|
|||
|
||||
$box
|
||||
.removeClass( 'mwe-popups-fade-out mwe-popups-fade-in' )
|
||||
.addClass( 'mwe-popups-fade-out' )
|
||||
.on( 'webkitAnimationEnd oanimationend msAnimationEnd animationend', function () {
|
||||
if ( $( this ).hasClass( 'mwe-popups-fade-out' ) ) {
|
||||
$( this )
|
||||
.off( 'webkitAnimationEnd oanimationend msAnimationEnd animationend' )
|
||||
.removeClass( 'mwe-popups-fade-out' )
|
||||
.attr( 'aria-hidden', 'true' )
|
||||
.hide();
|
||||
}
|
||||
} );
|
||||
.addClass( 'mwe-popups-fade-out' ); // Removed and added to trigger animation
|
||||
|
||||
setTimeout( function () {
|
||||
if ( $box.hasClass( 'mwe-popups-fade-out' ) ) {
|
||||
$box
|
||||
.attr( 'aria-hidden', 'true' )
|
||||
.hide()
|
||||
.removeClass( 'mwe-popups-fade-out' );
|
||||
}
|
||||
}, 150 ); // Matches 0.15s in the .mwe-popups-fade-out class
|
||||
|
||||
if ( closeTimer ) {
|
||||
clearTimeout( closeTimer );
|
||||
|
|
Loading…
Reference in a new issue