From 8c1e6526d6347d8084f359090d686039cc94fe18 Mon Sep 17 00:00:00 2001 From: Joerg Sonnenberger Date: Mon, 12 Oct 2015 23:55:30 +0200 Subject: [PATCH] Unbreak height computation on non-IE Fix a regression introduced by 0863affbad32095eb09c18084ec5df73c1f88c19: On browsers other than IE, `ie` is set to `false` and since `false > 8` is not true, the row height was truncated. This would typically show up when using Grids inside a TabContainer, since the onShow event triggers a resize. The fix reorders the branch to match the corresponding order in `getHeight()` earlier. --- modules/RowHeader.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/RowHeader.js b/modules/RowHeader.js index 45b8f0c61..3cf6df0c7 100644 --- a/modules/RowHeader.js +++ b/modules/RowHeader.js @@ -290,14 +290,14 @@ define([ }, _onResize: function(){ - var ie = has('ie')? has('ie') : has('trident')? 11 : false, + var ie = has('ie')? has('ie') : has('trident')? 11 : undefined, bn; for(var brn = this.grid.bodyNode.firstChild, n = this.bodyNode.firstChild; brn && n; brn = brn.nextSibling, n = n.nextSibling){ bn = this.grid.dod ? brn : brn.firstChild; - var h = ie > 8 ? domStyle.getComputedStyle(bn).height : bn.offsetHeight + 'px'; + var h = ie <= 8 ? bn.offsetHeight + 'px' : domStyle.getComputedStyle(bn).height; n.style.height = n.firstChild.style.height = h; }