mirror of
https://github.com/fergalmoran/ladybird.git
synced 2025-12-29 12:49:08 +00:00
LibWeb: Skip page scrolling for wheel events consumed by scrollable box
Fixes the bug when we scroll both scrollable box and page.
This commit is contained in:
committed by
Andreas Kling
parent
30d8c5f301
commit
90879a07ba
@@ -174,10 +174,9 @@ bool EventHandler::handle_mousewheel(CSSPixelPoint position, CSSPixelPoint scree
|
||||
if (paintable) {
|
||||
auto* containing_block = paintable->containing_block();
|
||||
while (containing_block) {
|
||||
if (containing_block->is_user_scrollable()) {
|
||||
const_cast<Painting::PaintableBox*>(containing_block->paintable_box())->handle_mousewheel({}, position, buttons, modifiers, wheel_delta_x, wheel_delta_y);
|
||||
break;
|
||||
}
|
||||
auto handled_scroll_event = const_cast<Painting::PaintableBox*>(containing_block->paintable_box())->handle_mousewheel({}, position, buttons, modifiers, wheel_delta_x, wheel_delta_y);
|
||||
if (handled_scroll_event)
|
||||
return true;
|
||||
containing_block = containing_block->containing_block();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user