mediawiki.notification: Also hide #mw-notification-area upon creation
authorRoan Kattouw <roan.kattouw@gmail.com>
Fri, 5 Sep 2014 18:40:27 +0000 (11:40 -0700)
committerBartosz Dziewoński <matma.rex@gmail.com>
Fri, 5 Sep 2014 18:53:59 +0000 (18:53 +0000)
6c5b246 made it so #mw-notification-area was hidden when the last
notification was dismissed, but it still left it visible when
initially creating it. This meant that if you used mw.notify(),
you had no problems, but if you loaded the mediawiki.notification
module manually and called it manually, you would still get
a 12px-tall click-stealing invisible div until the first notification
was displayed.

Bug: 52659
Change-Id: Ibec399ac9ef083036aa2b31a38bcc1bc36b87d96

resources/src/mediawiki/mediawiki.notification.js

index 79ec310..1968aa9 100644 (file)
                        // on links from hiding a notification.
                        .on( 'click', 'a', function ( e ) {
                                e.stopPropagation();
-                       } );
+                       } )
+                       .hide();
 
                // Prepend the notification area to the content area and save it's object.
                mw.util.$content.prepend( $area );