JSFiddle - React, Tailwind, and code Playground
by Ryan Duffy
CSS
.ex-app.enyo-fit {
top:1px;
bottom:-1px;
}
JavaScript
function hideAddressBar()
{
if(!window.location.hash)
{
if(document.height < window.outerHeight)
{
document.body.style.height = (window.outerHeight + 50) + 'px';
}
setTimeout( function(){ window.scrollTo(0, 1); }, 50 );
}
}
window.addEventListener("load", function(){ if(!window.pageYOffset){ hideAddressBar(); } } );
window.addEventListener("orientationchange", hideAddressBar );
enyo.kind({
name:"ex.App",
classes:"ex-app enyo-fit",
kind:"FittableRows",
components:[
{kind:"onyx.Toolbar", components:[
{content:"Title"}
]},
{fit:true, content:"body"},
{kind:"onyx.Toolbar", components:[
{content:"Footer"}
]}
]
});
new ex.App().renderInto(document.body);