Skip to content

Commit

Permalink
MDL-50312 grade/report/grader: Fixed remaining issue
Browse files Browse the repository at this point in the history
MDL-49764 fixed the appearance of user cells. However, the window
resize event was still incorrect. This is a fix for the window
resize event for ALL IE versions.
  • Loading branch information
jinhofer committed Jan 29, 2016
1 parent c9d91bb commit 8cc0238
Show file tree
Hide file tree
Showing 4 changed files with 50 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1075,9 +1075,24 @@ FloatingHeaders.prototype = {
var userCells = Y.all(SELECTORS.USERCELL);
this.userColumnHeader.one('.cell').setStyle('width', userWidth);
this.userColumn.all('.cell').each(function(cell, idx) {
var height = userCells.item(idx).getComputedStyle(HEIGHT);
// Nasty hack to account for Internet Explorer
if(Y.UA.ie !== 0) {
var node = userCells.item(idx);
var allHeight = node.getDOMNode ?
node.getDOMNode().getBoundingClientRect().height :
node.get('offsetHeight');
var marginHeight = parseInt(node.getComputedStyle('marginTop'),10) +
parseInt(node.getComputedStyle('marginBottom'),10);
var paddingHeight = parseInt(node.getComputedStyle('paddingTop'),10) +
parseInt(node.getComputedStyle('paddingBottom'),10);
var borderHeight = parseInt(node.getComputedStyle('borderTopWidth'),10) +
parseInt(node.getComputedStyle('borderBottomWidth'),10);
height = allHeight - marginHeight - paddingHeight - borderHeight;
}
cell.setStyles({
width: userWidth,
height: userCells.item(idx).getComputedStyle(HEIGHT)
height: height
});
}, this);

Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 8cc0238

Please sign in to comment.