Not working for iOS Chrome 74.0.3729.155.
This is because window.innerHeight has not been updated when an orientationchange event occurs. There is a workaround below, but I'd like to see it implemented in the library.
Workaround:
var test = vhCheck({
onUpdate: (obj: any) => {
orientationChanged().then(() => {
const cssVarName = "vh-offset";
const sizes = my.vhCheck.recompute();
document.documentElement.style.setProperty(`--${cssVarName}`, `${sizes.value}px`);
});
}
});
See this for the orientationChanged function: https://stackoverflow.com/a/44579732
Not working for iOS Chrome 74.0.3729.155.
This is because window.innerHeight has not been updated when an orientationchange event occurs. There is a workaround below, but I'd like to see it implemented in the library.
Workaround:
See this for the orientationChanged function: https://stackoverflow.com/a/44579732