From 68cc777cea7c6d3db5089d51af475d9f1721403e Mon Sep 17 00:00:00 2001 From: Krinkle Date: Tue, 17 Jan 2012 17:39:30 +0000 Subject: [PATCH] [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 --- resources/jquery/jquery.footHovzer.js | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) 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; } } -- 2.20.1