mirror of
https://github.com/fergalmoran/ladybird.git
synced 2025-12-29 21:00:06 +00:00
LibWeb: Add "focused frame" concept, one focused Frame per Page
Focus currently only moves when doing a mousedown in a frame.
This commit is contained in:
@@ -119,6 +119,8 @@ bool EventHandler::handle_mousedown(const Gfx::IntPoint& position, unsigned butt
|
||||
return false;
|
||||
}
|
||||
|
||||
m_frame.page().set_focused_frame({}, m_frame);
|
||||
|
||||
auto offset = compute_mouse_event_offset(position, *result.layout_node);
|
||||
node->dispatch_event(UIEvents::MouseEvent::create("mousedown", offset.x(), offset.y()));
|
||||
if (!layout_root())
|
||||
|
||||
Reference in New Issue
Block a user