I missed this topic somehow. Anyway, yes, I noticed the same issue and did similar thing long time ago, but my fix and math was little different. First, position:fixed is not mobile friendly. So, the below solution is different as a result of testing on many different devices:
$submenu.css('margin-top',((menuItemHeight-$submenu.height())/4)-15);
rewritten sidebar part and fixed/relative position:
//global
$('#sidebar').css({
height: '100%',
top:0
});
var calcPaddingBtm;
if($(window).height() < (620+headerHeight)){
if($('body').hasClass('compact')){
calcHeigt = $('#content-render').height();
if(calcHeigt<620){
calcHeigt = 620;
}
$('#sidebar').css({
height: calcHeigt,
top:0
});
}
//$('#content-page').css('background-color','red');
calcPaddingBtm = 620-($('#content-render').height())+50+10;
} else {
calcPaddingBtm = $(window).height()-($('#content-render').height()-10);
//$('#content-page').css('background-color','green');
}
$('#content-page').css({paddingBottom:calcPaddingBtm});
}
main.css
body.compact #content{
margin:0;
}
#content{
position:relative;
margin:0;
background-color:#FFF;
z-index:0;
min-height:600px;
}
#sidebar{
float:left;
height:100%;
width:79px;
border-right:solid 1px #DDD;
background-color:#F3F3F3;
overflow:visible;
z-index:3;
margin-right:5px;
}
This made it more small-screen friendly. I don't recall all the main.css changes which went along this particular mod, just major ones.
Regards