forked from SerenityOS/serenity
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
LibWeb: Do not consume scroll event in PaintableBox without overflow
Specifically, without scrollable overflow. Fixes SerenityOS#24009, both on brave.com and on the reduction.
- Loading branch information
Showing
3 changed files
with
51 additions
and
0 deletions.
There are no files selected for viewing
26 changes: 26 additions & 0 deletions
26
Tests/LibWeb/Ref/box-without-scrollable-overflow-should-not-consume-scroll-events.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
<!DOCTYPE html> | ||
<link rel="match" href="reference/box-without-scrollable-overflow-should-not-consume-scroll-events-ref.html" /> | ||
<style> | ||
.item { | ||
width: 100px; | ||
height: 100px; | ||
box-sizing: border-box; | ||
border: 1px solid black; | ||
} | ||
.item1 { overflow: auto; } | ||
.scrollable { | ||
overflow-y: scroll; | ||
width: 100px; | ||
height: 300px; | ||
scrollbar-width: none; | ||
} | ||
</style> | ||
<div class="scrollable"> | ||
<div class="item item1">1</div> | ||
<div class="item">2</div> | ||
<div class="item">3</div> | ||
<div class="item">4</div> | ||
</div> | ||
<script> | ||
internals.wheel(10, 10, 0, 100); | ||
</script> |
20 changes: 20 additions & 0 deletions
20
...b/Ref/reference/box-without-scrollable-overflow-should-not-consume-scroll-events-ref.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
<!DOCTYPE html> | ||
<style> | ||
.scrollable { | ||
overflow-y: scroll; | ||
width: 100px; | ||
height: 300px; | ||
scrollbar-width: none; | ||
} | ||
.item { | ||
width: 100px; | ||
height: 100px; | ||
box-sizing: border-box; | ||
border: 1px solid black; | ||
} | ||
</style> | ||
<div class="scrollable"> | ||
<div class="item">2</div> | ||
<div class="item">3</div> | ||
<div class="item">4</div> | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters