FixedHeader renders improperly in Chrome and Safari until the window is scrolled
FixedHeader renders improperly in Chrome and Safari until the window is scrolled
If I put FixedHeader onto a table, and view the page in Chrome or Safari, the header shows up twice... Once I scroll the page, it looks right; until then, it's wrong.
This happens even with the canned demos on this site, so I don't think it's me. :-)
I'm pretty sure it's a Webkit issue, but am not sure how to work around it.
In poking around the code a bit, it looks like the cloned header is given an absolute position that's wrong... And so, you see the original header and the clone, both.
Is there something I could try, to get around the issue?
This happens even with the canned demos on this site, so I don't think it's me. :-)
I'm pretty sure it's a Webkit issue, but am not sure how to work around it.
In poking around the code a bit, it looks like the cloned header is given an absolute position that's wrong... And so, you see the original header and the clone, both.
Is there something I could try, to get around the issue?
This discussion has been closed.
Replies
thatElement.hidden = true;
$(window).scroll(function() {
thatElement.hidden = false;
});
$(window).resize(function() {
thatElement.hidden = false;
});
That way, the rogue header is hidden until you scroll... At which point it shows up (in the right place).
Still not sure why it doesn't behave out of the box.
(Also, I just upgraded to 1.9.0. The cloned header is still in the wrong place, there, but is also rendered a little different -- in bold, IIRC.)
http://datatables.net/extras/fixedheader/
Allan