fix app height for ios
This commit is contained in:
parent
ceb3aa0627
commit
f3f18ffca7
3 changed files with 13 additions and 1 deletions
|
|
@ -80,4 +80,13 @@ const { strudelTheme } = settings;
|
|||
}
|
||||
setTheme(get().theme);
|
||||
watch(setTheme, 'theme');
|
||||
// https://medium.com/quick-code/100vh-problem-with-ios-safari-92ab23c852a8
|
||||
const appHeight = () => {
|
||||
const doc = document.documentElement;
|
||||
doc.style.setProperty('--app-height', `${window.innerHeight}px`);
|
||||
};
|
||||
if (typeof window !== 'undefined') {
|
||||
window.addEventListener('resize', appHeight);
|
||||
appHeight();
|
||||
}
|
||||
</script>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue