이것은 사용자가 2025-5-7 17:21에 https://github.com/ionic-team/capacitor/issues/2920을(를) 위해 저장한 이중 언어 스냅샷 페이지로, 몰입형 번역에 의해 제공된 이중 언어 지원이 있습니다. 저장하는 방법을 알아보세요?
Skip to content

”safe-area-inset-top“ delay about 300ms to have value #2920
”safe-area-inset-top“ 값이 약 300ms 지연됨 #2920

Closed
@eliot-ye

Description

@eliot-ye

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

Other Information  기타 정보

Activity

eliot-ye

eliot-ye commented on May 14, 2020

@eliot-ye
Author

???

kainosnoema

kainosnoema commented on May 7, 2021

@kainosnoema

@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 until window.readyState === "complete", and the safe-area-inset-* values will be ready.
제 해결책은 창 load 이벤트가 발생할 때까지 또는 window.readyState === "complete" 까지 앱 UI를 숨긴 상태로 유지하는 것이며, 그때 safe-area-inset-* 값들이 준비됩니다.

ionitron-bot

ionitron-bot commented on Nov 11, 2022

@ionitron-bot

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에서도 여전히 문제가 발생한다면, 새 이슈를 생성하고 템플릿을 완전히 작성해 주세요.

locked and limited conversation to collaborators on Nov 11, 2022
shren207

Add a comment

This conversation has been locked and limited to collaborators.
Remember, contributions to this repository should follow its contributing guidelines, security policy and code of conduct.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      No branches or pull requests
        You're not receiving notifications from this thread.

        Participants

        @kainosnoema@jcesarmobile@eliot-ye

        Issue actions

          ”safe-area-inset-top“ delay about 300ms to have value · Issue #2920 · ionic-team/capacitor