0

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?

Topher Fangio
  • 20,372
  • 15
  • 61
  • 94

1 Answers1

0

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;
}
Topher Fangio
  • 20,372
  • 15
  • 61
  • 94
  • 1
    SproutCore also applies those styles to the body element on its own; you may be able to save some bytes-over-the-wire by removing this CSS entirely. – Dave May 28 '13 at 13:56
  • 1
    That is true for SC pages, however, we have a lot of non-SC pages and I needed this to fix the height issues on them too :-) – Topher Fangio May 28 '13 at 17:39