From 7a035558e103f443a1d9e237c283e64196eb720c Mon Sep 17 00:00:00 2001 From: Adam Plumb Date: Tue, 15 Feb 2022 21:48:48 -0500 Subject: [PATCH] LibWeb: Set cursor on mousemove for non-text elements --- Userland/Libraries/LibWeb/Page/EventHandler.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Userland/Libraries/LibWeb/Page/EventHandler.cpp b/Userland/Libraries/LibWeb/Page/EventHandler.cpp index ae73ed7b08..8c90e3a50a 100644 --- a/Userland/Libraries/LibWeb/Page/EventHandler.cpp +++ b/Userland/Libraries/LibWeb/Page/EventHandler.cpp @@ -352,6 +352,12 @@ bool EventHandler::handle_mousemove(const Gfx::IntPoint& position, unsigned butt hovered_node_cursor = Gfx::StandardCursor::IBeam; else hovered_node_cursor = cursor_css_to_gfx(cursor); + } else if (node->is_element()) { + auto cursor = result.layout_node->computed_values().cursor(); + if (cursor == CSS::Cursor::Auto) + hovered_node_cursor = Gfx::StandardCursor::Arrow; + else + hovered_node_cursor = cursor_css_to_gfx(cursor); } auto offset = compute_mouse_event_offset(position, *result.layout_node);