This code make the map\'s div width max but height to 0 (the % value doesn\'t matter, it\'s always 0)
This is my fix:
function fixContentHeight(){
var viewHeight = $(window).height();
var header = $("div[data-role='header']:visible:visible");
var navbar = $("div[data-role='navbar']:visible:visible");
var content = $("div[data-role='content']:visible:visible");
var contentHeight = viewHeight - header.outerHeight() - navbar.outerHeight();
content.height(contentHeight);
map.updateSize();
}