Why does SC.ScrollView bounce on touch instead of scroll?

放肆的年华 提交于 2019-12-25 07:36:46

问题


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?


回答1:


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;
}


来源:https://stackoverflow.com/questions/16718020/why-does-sc-scrollview-bounce-on-touch-instead-of-scroll

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!