diff --git a/packages/uni-h5/src/service/api/device/getWindowInfo.ts b/packages/uni-h5/src/service/api/device/getWindowInfo.ts index 8bbce7c04d..fd27854878 100644 --- a/packages/uni-h5/src/service/api/device/getWindowInfo.ts +++ b/packages/uni-h5/src/service/api/device/getWindowInfo.ts @@ -31,7 +31,8 @@ export const getWindowInfo = defineSyncApi( height: windowHeight - safeAreaInsets.top - safeAreaInsets.bottom, } - const { top: windowTop, bottom: windowBottom } = getWindowOffset() + const { top, bottom: windowBottom, topWindowHeight } = getWindowOffset() + const windowTop = top + topWindowHeight windowHeight -= windowTop windowHeight -= windowBottom