Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix for IE7: Under certain circumstances, measurement of content height fails #15

Open
isrob opened this issue Oct 10, 2011 · 1 comment

Comments

@isrob
Copy link

isrob commented Oct 10, 2011

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.

@ghost
Copy link

ghost commented Dec 5, 2011

Thanks very much for this fix! I was going to put in a quick conditional hack, but decided to look here first. Glad I did!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant