Hi,
My case is the following :
- At the top of my page I have a header
- On the rest, I have a splitter with orientation Horizontal, inside a div with width: 100%, weight: 100% )
When I move the splitter, header disappears; but only with Chrome (It works correctly with FF & IE11 ...)
After investigations, the height calculated by the splitter is incorrect
I found a correlation with the fact that the offsetTop returned by Chrome is also incorrect
In fact, my page is not so simple as described previously : there is a lot a nested div. And at one point, the offsetTop returns to 0
Here is the code that I have to add so that it works (sorry for the quality of the code, i'm a beginner javascript developer) :
var contInit = document.getElementById("Container-" + splitterId); var cont = contInit; var top = cont.offsetTop; var zero = false; while (cont.parentElement !== document.body) { cont = cont.parentElement; if (cont.offsetTop === 0) zero = true; else if (cont.offsetTop !== 0 && zero) { zero = false; top = top + cont.offsetTop; } }contInit.style.height = "calc( 100vh - " + top + "px )"; var outerSplitter = $("#" + splitterId).data("kendoSplitter"); if (outerSplitter != null) outerSplitter.resize(true);
If you have a better solution, I'll take it
Regards
