mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-09-11 05:25:32 +03:00
LibWeb: Don't try to click a form image until it has loaded
We are often trying to click the image before it has finished loading. This results in us trying to click a 0x0 rect. Instead, wait until the image load event. This fixes a flake with form-image-submission.html often seen on CI.
This commit is contained in:
parent
653f41336b
commit
1fbf1bc4ac
Notes:
sideshowbarker
2024-07-16 18:03:21 +09:00
Author: https://github.com/trflynn89 Commit: https://github.com/SerenityOS/serenity/commit/1fbf1bc4ac Pull-request: https://github.com/SerenityOS/serenity/pull/24271
@ -28,7 +28,9 @@
|
||||
done();
|
||||
});
|
||||
|
||||
const imageRect = image.getBoundingClientRect();
|
||||
internals.click(imageRect.x + 10, imageRect.y + 20);
|
||||
image.addEventListener("load", () => {
|
||||
const imageRect = image.getBoundingClientRect();
|
||||
internals.click(imageRect.x + 10, imageRect.y + 20);
|
||||
});
|
||||
});
|
||||
</script>
|
||||
|
Loading…
Reference in New Issue
Block a user