diff --git a/Libraries/LibWeb/HtmlView.cpp b/Libraries/LibWeb/HtmlView.cpp index 9808b73878..767b5be9c7 100644 --- a/Libraries/LibWeb/HtmlView.cpp +++ b/Libraries/LibWeb/HtmlView.cpp @@ -244,6 +244,9 @@ void HtmlView::mousedown_event(GUI::MouseEvent& event) } else if (event.button() == GUI::MouseButton::Right) { if (on_link_context_menu_request) on_link_context_menu_request(link->href(), event.position().translated(screen_relative_rect().location())); + } else if (event.button() == GUI::MouseButton::Middle) { + if (on_link_middle_click) + on_link_middle_click(link->href()); } } else { if (event.button() == GUI::MouseButton::Left) { diff --git a/Libraries/LibWeb/HtmlView.h b/Libraries/LibWeb/HtmlView.h index 6c47830bda..5fd6406085 100644 --- a/Libraries/LibWeb/HtmlView.h +++ b/Libraries/LibWeb/HtmlView.h @@ -59,6 +59,7 @@ public: Function on_link_click; Function on_link_context_menu_request; + Function on_link_middle_click; Function on_link_hover; Function on_title_change; Function on_load_start;