thomd/jquery-scroll — Issue #15: Fix for IE7: Under certain circumstances, measurement of content height fails
Author: isrob
Created: 2011-10-10 13:31:14+00:00
State: open

Was tearing my hair out when container.contentHeight was always returning 0 on IE7, and therefore the scrollbar was never being drawn (as 0 is always less than the container height).

This line fixes it, within $.fn.scrollbar.contentHeight:

var height = wrapper.css({overflow:'hidden', zoom:'1'}).height();

(note the addition of the 'zoom' parameter to force hasLayout on the wrapper element.