mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-04-26 01:35:08 +02:00
LibWeb: Don't fire resize event until document actually resizes once
The first time Document learns its viewport size, we now suppress firing of the resize event. This fixes an issue on multiple websites that were not expecting resize events to fire so early in the loading process.
This commit is contained in:
committed by
Andreas Kling
parent
0cdbcfd8b0
commit
4e7558c88b
Notes:
sideshowbarker
2024-07-17 02:05:41 +09:00
Author: https://github.com/awesomekling Commit: https://github.com/LadybirdBrowser/ladybird/commit/4e7558c88b Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/547
12
Tests/LibWeb/Text/input/no-window-resize-on-load.html
Normal file
12
Tests/LibWeb/Text/input/no-window-resize-on-load.html
Normal file
@@ -0,0 +1,12 @@
|
||||
<script>
|
||||
var resizeCount = 0;
|
||||
onresize = function() {
|
||||
++resizeCount;
|
||||
}
|
||||
</script>
|
||||
<script src="include.js"></script>
|
||||
<script>
|
||||
test(() => {
|
||||
println("resize count: " + resizeCount);
|
||||
})
|
||||
</script>
|
||||
Reference in New Issue
Block a user