From: Krinkle Date: Tue, 17 Jan 2012 17:39:30 +0000 (+0000) Subject: [jquery.footHovzer] Remove buggy scrollstate preserver X-Git-Tag: 1.31.0-rc.0~25220 X-Git-Url: http://git.cyclocoop.org/%7B%24www_url%7Dadmin/compta/exercices/?a=commitdiff_plain;h=68cc777cea7c6d3db5089d51af475d9f1721403e;p=lhc%2Fweb%2Fwiklou.git [jquery.footHovzer] Remove buggy scrollstate preserver * Intended to preserver scroll-state (which is shifted when an element to the bottom gains height). However too unstable to be more handy that it is annoying when it is not. * Follows-up r107982 --- diff --git a/resources/jquery/jquery.footHovzer.js b/resources/jquery/jquery.footHovzer.js index 4ae8c8a0bd..56fc32d492 100644 --- a/resources/jquery/jquery.footHovzer.js +++ b/resources/jquery/jquery.footHovzer.js @@ -22,7 +22,7 @@ footHovzer = { update: function () { - var $body, winTop; + var $body; $body = $( 'body' ); if ( prevHeight === undefined ) { @@ -31,12 +31,7 @@ } else { newHeight = getHovzer().outerHeight( true ); $body.css( 'paddingBottom', ( parseFloat( $body.css( 'paddingBottom' ) ) - prevHeight ) + newHeight ); - // Update scroll so that page stays focusses on same area - winTop = $(window).scrollTop(); - if ( $(document).height() - $(window).height() > winTop ) { - $(window).scrollTop( winTop + ( newHeight - prevHeight ) ); - } - + prevHeight = newHeight; } }