Skip to content

Commit 7209b41

Browse files
committed
fix(h5): 修复 getSystemInfoSync API windowTop 计算错误的问题 (question/220141)
1 parent a9c5730 commit 7209b41

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

packages/uni-h5/src/service/api/device/getWindowInfo.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,8 @@ export const getWindowInfo = defineSyncApi<typeof uni.getWindowInfo>(
3131
height: windowHeight - safeAreaInsets.top - safeAreaInsets.bottom,
3232
}
3333

34-
const { top: windowTop, bottom: windowBottom } = getWindowOffset()
34+
const { top, bottom: windowBottom, topWindowHeight } = getWindowOffset()
35+
const windowTop = top + topWindowHeight
3536

3637
windowHeight -= windowTop
3738
windowHeight -= windowBottom

0 commit comments

Comments
 (0)