Bug 695569 - Prevent runaway kinetic scrolling [r=Cwiiis]

The kinetic scroll behaviour keeps trying to scroll the page
until the "momentum" from the kinetic scroll runs out. This
happens even if the content has reached the edge and cannot
scroll any further. This results in the scroll indicators
remaining visible even though there is no scrolling apparent
to the user. This patch stops this behaviour.
This commit is contained in:
Kartikaya Gupta 2011-10-31 16:27:29 -04:00
parent 32968fc78c
commit 4298b09dbd

View File

@ -1202,6 +1202,11 @@ var BrowserEventHandler = {
self.panAccumulatedDeltaY -= ady;
}
if (!self._elementCanScroll(panElement, -dx, -dy)) {
BrowserApp.hideScrollbars();
return;
}
self._scrollElementBy(panElement, -dx, -dy);
if (Math.abs(self.panX) >= kMinKineticSpeed ||