This regression was caused by using $().offset() on a hidden element, which returns
the current scroll position making the script think the notification area starts
where the scroll position is, so it would not become fixed until you scroll further.
Bug: T114606
Change-Id: Ice62cf3ea7b1a29e33baeca05d1a088a68c9a785
// 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 );
offset = $area.offset();
+ $area.hide();
function updateAreaMode() {
var isFloating = $window.scrollTop() > offset.top;