commit 97124d69b9b4bd3365aaa02390cdccb4a5a379f6
Author: Koen Deforche <koen.deforche@blooloc.com>
Date:   Wed May 23 22:51:04 2018 +0200

    suggested fix for #6293

diff --git a/src/js/WtResize.js b/src/js/WtResize.js
index 4836a66..6c84e6f 100644
--- a/src/js/WtResize.js
+++ b/src/js/WtResize.js
@@ -142,21 +142,32 @@ WT_DECLARE_WT_MEMBER
  function(self, child, dir, size) {
   var WT = this, i, il;
 
+  var lastSize = 0;
+
   for (i = 0, il = self.childNodes.length; i < il; ++i) {
     var c = self.childNodes[i];
     if (c != child) {
       var pc = WT.css(c, 'position');
       if (pc != 'absolute' && pc != 'fixed') {
 	if (dir === 0) {
-	  size = Math.max(size, c.offsetWidth);
+	  lastSize = c.offsetWidth;
 	} else {
-	  size += c.offsetHeight + WT.px(c, 'marginTop')
+	  lastSize = c.offsetHeight + WT.px(c, 'marginTop')
 	    + WT.px(c, 'marginBottom');
 	}
       }
+    } else {
+      lastSize = 0;
     }
   }
 
+  if (lastSize != 0) {
+    if (dir === 0)
+      size = Math.max(size, lastSize);
+    else
+      size += lastSize;
+  }
+
   return size;
  }
  );
diff --git a/src/js/WtResize.min.js b/src/js/WtResize.min.js
index 276bfa9..1290c19 100644
--- a/src/js/WtResize.min.js
+++ b/src/js/WtResize.min.js
@@ -1,5 +1,5 @@
-WT_DECLARE_WT_MEMBER(10,JavaScriptFunction,"ChildrenResize",function(a,f,c,e){function i(j){var k=b.px(j,"marginTop");k+=b.px(j,"marginBottom");if(!b.boxSizing(j)){k+=b.px(j,"borderTopWidth");k+=b.px(j,"borderBottomWidth");k+=b.px(j,"paddingTop");k+=b.px(j,"paddingBottom")}return k}var b=this,h=c>=0;a.lh=h&&e;a.style.height=h?c+"px":"";if(b.boxSizing(a)){c-=b.px(a,"marginTop");c-=b.px(a,"marginBottom");c-=b.px(a,"borderTopWidth");c-=b.px(a,"borderBottomWidth");c-=b.px(a,"paddingTop");c-=b.px(a,"paddingBottom");
-f-=b.px(a,"marginLeft");f-=b.px(a,"marginRight");f-=b.px(a,"borderLeftWidth");f-=b.px(a,"borderRightWidth");f-=b.px(a,"paddingLeft");f-=b.px(a,"paddingRight")}var g,m,d;g=0;for(m=a.childNodes.length;g<m;++g){d=a.childNodes[g];if(d.nodeType==1&&!$(d).hasClass("wt-reparented"))if(h){var l=c-i(d);if(l>0){if(d.offsetTop>0){var n=b.css(d,"overflow");if(n==="visible"||n==="")d.style.overflow="auto"}if(d.wtResize)d.wtResize(d,f,l,e);else{l=l+"px";if(d.style.height!=l){d.style.height=l;d.lh=e}}}}else if(d.wtResize)d.wtResize(d,
-f,-1);else{d.style.height="";d.lh=false}}});WT_DECLARE_WT_MEMBER(11,JavaScriptFunction,"ChildrenGetPS",function(a,f,c,e){return e});
-WT_DECLARE_WT_MEMBER(12,JavaScriptFunction,"LastResize",function(a,f,c,e){var i=this,b=c>=0;a.lh=b&&e;a.style.height=b?c+"px":"";for(a=a.lastChild;a&&a.nodeType==1&&$(a).hasClass("wt-reparented");)a=a.previousSibling;if(a){var h=a.previousSibling;if(b){c-=h.offsetHeight+i.px(h,"marginTop")+i.px(h,"marginBottom");if(c>0)if(a.wtResize)a.wtResize(a,f,c,e);else{a.style.height=c+"px";a.lh=e}}else if(a.wtResize)a.wtResize(a,-1,-1);else{a.style.height="";a.lh=false}}});
-WT_DECLARE_WT_MEMBER(13,JavaScriptFunction,"LastGetPS",function(a,f,c,e){var i=this,b,h;b=0;for(h=a.childNodes.length;b<h;++b){var g=a.childNodes[b];if(g!=f){var m=i.css(g,"position");if(m!="absolute"&&m!="fixed")if(c===0)e=Math.max(e,g.offsetWidth);else e+=g.offsetHeight+i.px(g,"marginTop")+i.px(g,"marginBottom")}}return e});
+WT_DECLARE_WT_MEMBER(10,JavaScriptFunction,"ChildrenResize",function(a,f,d,e){function j(k){var l=b.px(k,"marginTop");l+=b.px(k,"marginBottom");if(!b.boxSizing(k)){l+=b.px(k,"borderTopWidth");l+=b.px(k,"borderBottomWidth");l+=b.px(k,"paddingTop");l+=b.px(k,"paddingBottom")}return l}var b=this,g=d>=0;a.lh=g&&e;a.style.height=g?d+"px":"";if(b.boxSizing(a)){d-=b.px(a,"marginTop");d-=b.px(a,"marginBottom");d-=b.px(a,"borderTopWidth");d-=b.px(a,"borderBottomWidth");d-=b.px(a,"paddingTop");d-=b.px(a,"paddingBottom");
+f-=b.px(a,"marginLeft");f-=b.px(a,"marginRight");f-=b.px(a,"borderLeftWidth");f-=b.px(a,"borderRightWidth");f-=b.px(a,"paddingLeft");f-=b.px(a,"paddingRight")}var h,i,c;h=0;for(i=a.childNodes.length;h<i;++h){c=a.childNodes[h];if(c.nodeType==1&&!$(c).hasClass("wt-reparented"))if(g){var m=d-j(c);if(m>0){if(c.offsetTop>0){var n=b.css(c,"overflow");if(n==="visible"||n==="")c.style.overflow="auto"}if(c.wtResize)c.wtResize(c,f,m,e);else{m=m+"px";if(c.style.height!=m){c.style.height=m;c.lh=e}}}}else if(c.wtResize)c.wtResize(c,
+f,-1);else{c.style.height="";c.lh=false}}});WT_DECLARE_WT_MEMBER(11,JavaScriptFunction,"ChildrenGetPS",function(a,f,d,e){return e});
+WT_DECLARE_WT_MEMBER(12,JavaScriptFunction,"LastResize",function(a,f,d,e){var j=this,b=d>=0;a.lh=b&&e;a.style.height=b?d+"px":"";for(a=a.lastChild;a&&a.nodeType==1&&$(a).hasClass("wt-reparented");)a=a.previousSibling;if(a){var g=a.previousSibling;if(b){d-=g.offsetHeight+j.px(g,"marginTop")+j.px(g,"marginBottom");if(d>0)if(a.wtResize)a.wtResize(a,f,d,e);else{a.style.height=d+"px";a.lh=e}}else if(a.wtResize)a.wtResize(a,-1,-1);else{a.style.height="";a.lh=false}}});
+WT_DECLARE_WT_MEMBER(13,JavaScriptFunction,"LastGetPS",function(a,f,d,e){var j=this,b,g,h=0;b=0;for(g=a.childNodes.length;b<g;++b){var i=a.childNodes[b];if(i!=f){var c=j.css(i,"position");if(c!="absolute"&&c!="fixed")h=d===0?i.offsetWidth:i.offsetHeight+j.px(i,"marginTop")+j.px(i,"marginBottom")}else h=0}if(h!=0)if(d===0)e=Math.max(e,h);else e+=h;return e});
