fix: Fixed issue where safe area insets were not always applying properly on iOS, causing a UI shift (#2912)
This commit is contained in:
committed by
GitHub
parent
07f45245a3
commit
117781bb36
@@ -370,7 +370,9 @@ const MobileWebAppContents = ({ destroyAndReload }: { destroyAndReload: () => vo
|
||||
document.documentElement.style.setProperty('--safe-area-inset-right', '${insets.right}px');
|
||||
true;
|
||||
`
|
||||
webViewRef.current?.injectJavaScript(injectJS)
|
||||
if (Platform.OS === 'android') {
|
||||
webViewRef.current?.injectJavaScript(injectJS)
|
||||
}
|
||||
|
||||
if (showAndroidWebviewUpdatePrompt) {
|
||||
return (
|
||||
|
||||
@@ -25,10 +25,10 @@
|
||||
|
||||
--reach-checkbox: 1;
|
||||
|
||||
--safe-area-inset-top: 0px;
|
||||
--safe-area-inset-bottom: 0px;
|
||||
--safe-area-inset-left: 0px;
|
||||
--safe-area-inset-right: 0px;
|
||||
--safe-area-inset-top: env(safe-area-inset-top, 0);
|
||||
--safe-area-inset-bottom: env(safe-area-inset-bottom, 0);
|
||||
--safe-area-inset-left: env(safe-area-inset-left, 0);
|
||||
--safe-area-inset-right: env(safe-area-inset-right, 0);
|
||||
|
||||
--sn-stylekit-font-size-editor: 0.9375rem;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user