markmalek / Fixed-Header-Table

jQuery plugin for tables with fixed headers
www.fixedheadertable.com
MIT License
930 stars 541 forks source link

Horizontal scrollbar is not visible in bottom in IE9 #118

Open afromogli opened 10 years ago

afromogli commented 10 years ago

Hi,

the bottom horizontal scrollbar is not visible in IE9 on Win 7. Cannot attach screenshot because of sensitive data but it does exist. Will try to fix it on my own, but I thought it would be good to let you guys know.

// AfroMogli

afromogli commented 10 years ago

Investigated the problem and found that the following line is faulty: var tbodyHeight = $wrapper.height() - $thead.outerHeight(true) - tfootHeight - tableProps.border; (line 163 in jquery.fixedheadertable.js)

$thead.outerHeight(true) returns 0 for some reason while it for instance in Chrome returns 31 or something. This makes the tbodyHeight to heigh and thus the bottom scrollbar is not visible.

afromogli commented 10 years ago

Solved it by doing this: var theadHeight = Math.max($thead.outerHeight(true), $thead.outerHeight(false)); var tbodyHeight = $wrapper.height() - theadHeight - tfootHeight - tableProps.border;

And it works! The problem was that outerHeight(true) did not work, returned only 0. OuterHeight(false) worked