Why does SC.ScrollView bounce on touch instead of

2019-08-30 18:04发布

On my mobile app, the SC.ScrollView appears to function properly in that it begins to scroll downward, however after I release my finger, instead of continuing to scroll down, it bounces back to it's original position.

It works perfectly when I run everything through sc-server, but once I push it to production using sc-build, it messes up.

What could be causing this?

标签: sproutcore
1条回答
叼着烟拽天下
2楼-- · 2019-08-30 18:35

Turns out, one of my stylesheets had done something stupid and manually set the height of the body to be 10,000px which apparently messes up the scrollbars. They expect the body's dimensions to be exactly the same size as the screen.

I changed my css to the following and it works:

body {
  position: absolute;
  top: 0px;
  bottom: 0px;
  left: 0px;
  right: 0px;
}
查看更多
登录 后发表回答