mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-12-04 11:26:09 +00:00
Bug 829862 - Recalculate scroll direction when traversing to the outer frame. r=vivien
This commit is contained in:
parent
e38a539d67
commit
bb9e1b8d60
@ -372,10 +372,13 @@ const ContentPanning = {
|
||||
let isScrolling = false;
|
||||
let oldX, oldY, newX, newY;
|
||||
let win, doc, htmlNode, bodyNode;
|
||||
let xScrollable = content.scrollWidth > content.clientWidth;
|
||||
let yScrollable = content.scrollHeight > content.clientHeight;
|
||||
let xScrollable;
|
||||
let yScrollable;
|
||||
|
||||
function doScroll(node, delta) {
|
||||
// recalculate scrolling direction
|
||||
xScrollable = node.scrollWidth > node.clientWidth;
|
||||
yScrollable = node.scrollHeight > node.clientHeight;
|
||||
if (node instanceof Ci.nsIDOMHTMLElement) {
|
||||
newX = oldX = node.scrollLeft, newY = oldY = node.scrollTop;
|
||||
if (xScrollable) {
|
||||
|
Loading…
Reference in New Issue
Block a user