Commit 155f5bf9 authored by 李勇諭's avatar 李勇諭

fix on mobile

parent 000e71c8
...@@ -72,7 +72,7 @@ export class PullToRefresh extends React.Component<PullToRefreshProps, PullToRef ...@@ -72,7 +72,7 @@ export class PullToRefresh extends React.Component<PullToRefreshProps, PullToRef
private onTouchStart(e) { private onTouchStart(e) {
this.startY = e["pageY"] || e.touches[0].pageY; this.startY = e["pageY"] || e.touches[0].pageY;
this.currentY = this.startY; this.currentY = this.startY;
const top = this.container.getBoundingClientRect().y; const top = this.container.getBoundingClientRect().top || this.container.getBoundingClientRect().y || 0;
if (this.startY - top > 40) { if (this.startY - top > 40) {
return; return;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment