streamflow/frontend/public/viewport-fix.js
2025-12-17 00:42:43 +00:00

8 lines
281 B
JavaScript

// Fix for mobile viewport height with address bar
function setVh() {
const vh = window.innerHeight * 0.01;
document.documentElement.style.setProperty('--vh', `${vh}px`);
}
setVh();
window.addEventListener('resize', setVh);
window.addEventListener('orientationchange', setVh);