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
Родитель 2c45ed1b55
Коммит 3127e52e45
1 изменённых файлов: 5 добавлений и 0 удалений

Просмотреть файл

@ -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 ||