1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-06-01 03:28:13 +00:00

WebContent: Switch scroll direction on shift modifier

This commit is contained in:
Dmitry Petrov 2022-01-20 22:35:01 +01:00 committed by Idan Horowitz
parent b0a54518d8
commit 2616b61eee

View file

@ -117,6 +117,9 @@ bool EventHandler::handle_mousewheel(const Gfx::IntPoint& position, unsigned int
if (!layout_root())
return false;
if (modifiers & KeyModifier::Mod_Shift)
swap(wheel_delta_x, wheel_delta_y);
// FIXME: Support wheel events in subframes.
auto result = layout_root()->hit_test(position, Layout::HitTestType::Exact);