Bug 1723439 - Ensure we paint so that hit-testing works as we expect. r=nika

Otherwise we get a mouseevent targeted at the window and the autoscroll
code gets confused.

Differential Revision: https://phabricator.services.mozilla.com/D121525
This commit is contained in:
Emilio Cobos Álvarez 2021-08-06 10:14:10 +00:00
parent f73fdc7e79
commit 9f18e86200

View File

@ -190,6 +190,14 @@ body > div > div {width: 1000px;height: 1000px;}\
);
BrowserTestUtils.loadURI(gBrowser, test.dataUri);
await loadedPromise;
await ContentTask.spawn(gBrowser.selectedBrowser, {}, async () => {
// Wait for a paint so that hit-testing works correctly.
await new Promise(resolve =>
content.requestAnimationFrame(() =>
content.requestAnimationFrame(resolve)
)
);
});
continue;
}