Merge "mediawiki.notification: Use css() instead of slow show()/hide()"
authorjenkins-bot <jenkins-bot@gerrit.wikimedia.org>
Wed, 4 Oct 2017 21:44:23 +0000 (21:44 +0000)
committerGerrit Code Review <gerrit@wikimedia.org>
Wed, 4 Oct 2017 21:44:23 +0000 (21:44 +0000)
resources/src/mediawiki/mediawiki.notification.js

index dfacfc6..c213cd2 100644 (file)
        Notification.prototype.start = function () {
                var options, $notification, $tagMatches, autohideCount;
 
-               $area.show();
+               $area.css( 'display', '' );
 
                if ( this.isOpen ) {
                        return;
                                if ( openNotificationCount === 0 ) {
                                        // Hide the area after the last notification closes. Otherwise, the padding on
                                        // the area can be obscure content, despite the area being empty/invisible (T54659). // FIXME
-                                       $area.hide();
+                                       $area.css( 'display', 'none' );
                                        notif.$notification.remove();
                                } else {
                                        notif.$notification.slideUp( 'fast', function () {
                // Prepend the notification area to the content area and save it's object.
                mw.util.$content.prepend( $area );
                offset = $area.offset();
-               $area.hide();
+               $area.css( 'display', 'none' );
 
                function updateAreaMode() {
                        var shouldFloat = window.pageYOffset > offset.top;