зеркало из https://github.com/mozilla/pjs.git
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:
Родитель
2c45ed1b55
Коммит
3127e52e45
|
@ -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 ||
|
||||
|
|
Загрузка…
Ссылка в новой задаче