             
             if (verticalScrollBar)
                 verticalScrollBar.alpha = viewport.contentHeight > viewport.height ? 1.0 : 0.0;
-        }
+            
+            inTouchInteraction = true;
+        }
+    }
+    
+    /**
+     *  @private
+     *  Snap the scroll positions to valid values.
+     */
+    private function snapContentScrollPosition():void
+    {
+        var maxHsp:Number = viewport.contentWidth > viewport.width ? 
+            viewport.contentWidth-viewport.width : 0; 
+        viewport.horizontalScrollPosition = 
+            Math.min(Math.max(0,viewport.horizontalScrollPosition),maxHsp);
+
+        var maxVsp:Number = viewport.contentHeight > viewport.height ? 
+            viewport.contentHeight-viewport.height : 0; 
+        viewport.verticalScrollPosition = 
+            Math.min(Math.max(0,viewport.verticalScrollPosition),maxVsp);
     }
     
     /**

        scrollingHorizontally = false;
        var horizontalTime:Number = 0;
        var finalKeyframe:int;
        if (scrollerLayout && scrollerLayout.canScrollHorizontally)
        {
            var hsp:Number = viewport.horizontalScrollPosition;

            // after that, so we want to block this next mouseClick
            
            hideScrollBars();
            inTouchInteraction = false;
        }
    }
    
