Description
Bug Report 버그 보고서
Capacitor Version 캐패시터 버전
npx cap doctor
output: npx cap doctor
출력:
@capacitor/cli 2.1.0
@capacitor/core 2.1.0
@capacitor/android 2.1.0
@capacitor/ios 2.1.0
Affected Platform(s) 영향 받는 플랫폼(들)
- Android 안드로이드
- [ x ] iOS
- Electron 일렉트론
- Web 웹
Current Behavior 현재 동작
To get the height of a div with "safe area inset top", you can only get the height of the div itself at the beginning, without the height of "safe-area-inset-top". After about 300ms, you can get the height of the div as your own height + "safe-area-inset-top"
"safe area inset top"이 적용된 div의 높이를 얻으려면 처음에는 div 자체의 높이만 얻을 수 있으며, "safe-area-inset-top"의 높이는 포함되지 않습니다. 약 300ms 후에야 div의 높이를 자신의 높이 + "safe-area-inset-top"으로 얻을 수 있습니다.
Expected Behavior 예상 동작
The height of the div should be the height of itself + the height of "safe-area-inset-top" at the beginning
div의 높이는 처음부터 자신의 높이 + "safe-area-inset-top"의 높이여야 합니다.
Sample Code or Sample Application Repo
샘플 코드 또는 샘플 애플리케이션 저장소
Reproduction Steps 재현 단계
Other Technical Details 기타 기술 세부사항
npm --version
output: npm --version
출력:
6.12.1
node --version
output: node --version
출력:
v12.13.1
pod --version
output (iOS issues only):
pod --version
출력 (iOS 문제만 해당):
1.9.1
Activity
eliot-ye commentedon May 14, 2020
???
kainosnoema commentedon May 7, 2021
@eliot-ye I discovered that it's due to this bug in WKWebView: https://bugs.webkit.org/show_bug.cgi?id=191872.
이 문제가 WKWebView의 버그 때문임을 발견했습니다: https://bugs.webkit.org/show_bug.cgi?id=191872.
My solution is to keep app UI hidden until the window
load
event, or untilwindow.readyState === "complete"
, and thesafe-area-inset-*
values will be ready.제 해결책은 창
load
이벤트가 발생할 때까지 또는window.readyState === "complete"
까지 앱 UI를 숨긴 상태로 유지하는 것이며, 그때safe-area-inset-*
값들이 준비됩니다.ionitron-bot commentedon Nov 11, 2022
Thanks for the issue! This issue is being locked to prevent comments that are not relevant to the original issue. If this is still an issue with the latest version of Capacitor, please create a new issue and ensure the template is fully filled out.
문제 제보 감사합니다! 이 문제는 원래 문제와 관련 없는 댓글을 방지하기 위해 잠금 처리됩니다. 최신 버전의 Capacitor에서도 여전히 문제가 발생한다면, 새 이슈를 생성하고 템플릿을 완전히 작성해 주세요.
Add a comment