зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1800973 - Make promiseMoveMouseAndScrollWheelOver wait the proper Promise. r=botond
Differential Revision: https://phabricator.services.mozilla.com/D162244
This commit is contained in:
Родитель
9487d78e93
Коммит
d682b5dbac
|
@ -1282,13 +1282,25 @@ function promiseMoveMouseAndScrollWheelOver(
|
|||
offsetY: dy,
|
||||
});
|
||||
if (waitForScroll) {
|
||||
p = p.then(() =>
|
||||
promiseNativeWheelAndWaitForScrollEvent(target, dx, dy, 0, -scrollDelta)
|
||||
);
|
||||
p = p.then(() => {
|
||||
return promiseNativeWheelAndWaitForScrollEvent(
|
||||
target,
|
||||
dx,
|
||||
dy,
|
||||
0,
|
||||
-scrollDelta
|
||||
);
|
||||
});
|
||||
} else {
|
||||
p = p.then(() =>
|
||||
promiseNativeWheelAndWaitForWheelEvent(target, dx, dy, 0, -scrollDelta)
|
||||
);
|
||||
p = p.then(() => {
|
||||
return promiseNativeWheelAndWaitForWheelEvent(
|
||||
target,
|
||||
dx,
|
||||
dy,
|
||||
0,
|
||||
-scrollDelta
|
||||
);
|
||||
});
|
||||
}
|
||||
return p;
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче