From 25c71e335e1e63188e5e2f4a844a8659cacbfa97 Mon Sep 17 00:00:00 2001 From: "sugar.lin" <339426723@qq.com> Date: Tue, 28 Jun 2016 10:32:55 +0800 Subject: [PATCH] =?UTF-8?q?fix=20=E4=B8=8B=E6=8B=89=E5=88=B7=E6=96=B0?= =?UTF-8?q?=EF=BC=8C=E5=BD=93=E5=AE=B9=E5=99=A8=E4=B8=8D=E6=98=AFbody?= =?UTF-8?q?=E6=97=B6=E7=9A=84bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/js/pull-to-refresh.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/js/pull-to-refresh.js b/src/js/pull-to-refresh.js index 6a2eb00..7fe919e 100644 --- a/src/js/pull-to-refresh.js +++ b/src/js/pull-to-refresh.js @@ -7,6 +7,7 @@ "use strict"; var PTR = function(el) { + this.body = $('body'); this.container = $(el); this.distance = 50; this.attachEvents(); @@ -22,7 +23,7 @@ PTR.prototype.touchMove= function(e) { if(this.container.hasClass("refreshing")) return; if(!this.start) return false; - if(this.container.scrollTop() > 0) return; + if(this.container.scrollTop() > 0 || this.body.scrollTop() > 0) return; var p = $.getTouchPosition(e); this.diffX = p.x - this.start.x; this.diffY = p.y - this.start.y;