mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 12:38:12 +00:00
LibWeb: Dispatch "mouseup" event
This is a very naive implementation that doesn't account for where the mousedown happened.
This commit is contained in:
parent
8b18674229
commit
b196665131
1 changed files with 6 additions and 0 deletions
|
@ -248,6 +248,12 @@ void HtmlView::mouseup_event(GUI::MouseEvent& event)
|
||||||
if (!layout_root())
|
if (!layout_root())
|
||||||
return GUI::ScrollableWidget::mouseup_event(event);
|
return GUI::ScrollableWidget::mouseup_event(event);
|
||||||
|
|
||||||
|
auto result = layout_root()->hit_test(to_content_position(event.position()));
|
||||||
|
if (result.layout_node) {
|
||||||
|
if (auto* node = result.layout_node->node())
|
||||||
|
const_cast<Node*>(node)->dispatch_event("mouseup");
|
||||||
|
}
|
||||||
|
|
||||||
if (event.button() == GUI::MouseButton::Left) {
|
if (event.button() == GUI::MouseButton::Left) {
|
||||||
dump_selection("MouseUp");
|
dump_selection("MouseUp");
|
||||||
m_in_mouse_selection = false;
|
m_in_mouse_selection = false;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue