Thomas,
Here is the git show for the changes that I made on my end. It basically checks for Internet Explorer, then if it finds IE will obtain the height using .get() then accounting for the padding, margins, and borders. This process will return the correct height for all browsers, but I added the if() clause to prevent any other browsers from going through the extra steps since .getComputedStyle() works for all browsers except IE.
--- a/grade/report/grader/yui/src/gradereporttable/js/floatingheaders.js
+++ b/grade/report/grader/yui/src/gradereporttable/js/floatingheaders.js
@@ -477,13 +477,23 @@ FloatingHeaders.prototype = {
// Generate the new fields.
userColumn.each(function(node) {
+ var height = node.getComputedStyle(HEIGHT);
+ //Nasty hack to account for Internet Explorer
+ if(Object.hasOwnProperty.call(window, "ActiveXObject") && !window.ActiveXObject) {
+ var allHeight = node.get('offsetHeight');
+ var marginHeight = parseInt(node.getComputedStyle('marginTop'),10) + parseInt(node.getComputedStyle('marginBottom');
+ var paddingHeight = parseInt(node.getComputedStyle('paddingTop'),10) + parseInt(node.getComputedStyle('paddingBottom');
+ var borderHeight = parseInt(node.getComputedStyle('borderTopWidth'),10) + parseInt(node.getComputedStyle('borderBottom');
+ height = allHeight - marginHeight - paddingHeight - borderHeight;
+ }
// Create and configure the new container.
var containerNode = Y.Node.create('<div></div>');
containerNode.set('innerHTML', node.get('innerHTML'))
.setAttribute('class', node.getAttribute('class'))
.setAttribute('data-uid', node.ancestor('tr').getData('uid'))
.setStyles({
- height: node.getComputedStyle(HEIGHT),
+ height: height,
width: node.getComputedStyle(WIDTH)
});