         else if (vsbVisible && vsbTakeUpSpace && !vsbFits(w, h))  // just trying to show VSB, but it doesn't fit
             vsbVisible = false;
         
+        // if the only reason for showing one particular scrollbar was because the 
+        // other scrollbar was visible, and we're now not showing the other scrollbar, 
+        // then there's no need to allow scrolling in that direction anymore.
+        if (hsbIsDependent && !vsbVisible)
+            _canScrollHorizontally = false;
+        if (vsbIsDependent && !hsbVisible)
+            _canScrollVertically = false;
+        
         // Reset the viewport's width,height to account for the visible scrollbars, unless
         // the viewport's size was explicitly set, then we just use that.
         

        if (((cw == 0) && (ch == 0)) || (isNaN(cw) || isNaN(ch)))
            return new Point(0,0);
        return MatrixUtil.transformSize(cw, ch, viewport.getLayoutMatrix());
    }

    //----------------------------------

        var hsbIsDependent:Boolean = false;
        var vsbIsDependent:Boolean = false;
        
        if (vsbVisible && !hsbVisible && hAuto && (contentW >= (viewportW + SDT)))
            hsbVisible = hsbIsDependent = _canScrollHorizontally = true;
        else if (!vsbVisible && hsbVisible && vAuto && (contentH >= (viewportH + SDT)))
            vsbVisible = vsbIsDependent = _canScrollVertically = true;

        // If the HSB doesn't fit, hide it and give the space back.   Likewise for VSB.
        // If both scrollbars are supposed to be visible but they don't both fit, 
