zepto-refresh icon indicating copy to clipboard operation
zepto-refresh copied to clipboard

hybrid开发android 4.3.0以下 滚动加载更多height bug

Open nevergiveup-j opened this issue 9 years ago • 0 comments

hybrid开发android 4.3.0以下 滚动加载更多height bug zepto

$(window).height() // 获取值:240

解决方案:

var viewHeight = $(window).height();
var isAndroid = /android/i.test( navigator.userAgent.toLowerCase() ) || /Linux/i.test( navigator.userAgent.toLowerCase() );

// android 4.3以下window高度问题
if(isAndroid) {
    var screenHeight = window.screen.height - 100;
    viewHeight = Math.max(viewHeight, screenHeight);
}

nevergiveup-j avatar Dec 16 '15 07:12 nevergiveup-j