Skip to content

Commit 3571a79

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

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

  • packages/uni-core/src/helpers

packages/uni-core/src/helpers/dom.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ export function getWindowOffset() {
2525
const right = getWindowOffsetCssVar(style, '--window-right')
2626
const topWindowHeight = getWindowOffsetCssVar(style, '--top-window-height')
2727
return {
28-
top,
28+
top: top + (topWindowHeight || 0),
2929
bottom: bottom ? bottom + safeAreaInsets.bottom : 0,
3030
left: left ? left + safeAreaInsets.left : 0,
3131
right: right ? right + safeAreaInsets.right : 0,

0 commit comments

Comments
 (0)