On skins with a border and/or a margin on the <body> or the <html>
element the width of <body> is smaller than the width of the window.
Also use .appendTo( document.body ) instead of .appendTo( $( 'body' ) ).
Bug: T47668
Change-Id: I209eb6e3b95ba0fc6e7c5084242a90ca04c9e196
} else {
// Expand from right
newCSS.left = 'auto';
- newCSS.right = $( 'body' ).width() - ( regionPosition.left + context.config.$region.outerWidth() );
+ newCSS.right = document.documentElement.clientWidth -
+ ( regionPosition.left + context.config.$region.outerWidth() );
}
context.data.$container.css( newCSS );
);
} )
)
- .appendTo( $( 'body' ) );
+ .appendTo( document.body );
$( this )
// Stop browser autocomplete from interfering