Skip to content

Commit c818452

Browse files
authored
Merge pull request #150 from wechat-miniprogram/fix-webview-navBarHeight
fix: webview navBarHeight
2 parents 3b17522 + 4ef946d commit c818452

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

miniprogram/component/navigation-bar/navigation-bar.js

+3-1
Original file line numberDiff line numberDiff line change
@@ -58,13 +58,15 @@ Component({
5858
const rect = wx.getMenuButtonBoundingClientRect
5959
? wx.getMenuButtonBoundingClientRect()
6060
: null
61+
const isSkyline = this.renderer ==='skyline'
6162
wx.getSystemInfo({
6263
success: (res) => {
6364
const ios = !!(res.system.toLowerCase().search('ios') + 1)
6465
this.setData({
6566
ios,
6667
statusBarHeight: res.statusBarHeight,
67-
navBarHeight: rect.bottom - rect.top + 10,
68+
// skyline defaultContentBox:true ; webview border-box
69+
navBarHeight: rect.bottom - rect.top + 10 + ( isSkyline ? 0 : res.statusBarHeight),
6870
innerWidth: isSupport ? `width:${rect.left}px` : '',
6971
innerPaddingRight: isSupport
7072
? `padding-right:${res.windowWidth - rect.left}px`

0 commit comments

Comments
 (0)