From 8182a709e3edd50c7bb794409ffac5ea82e4f3d3 Mon Sep 17 00:00:00 2001 From: FalseHonesty Date: Wed, 6 May 2020 15:34:10 -0400 Subject: [PATCH] Browser: Open links in a new tab when middle clicked --- Applications/Browser/Tab.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Applications/Browser/Tab.cpp b/Applications/Browser/Tab.cpp index 9de3288f2d..fe64cbdae4 100644 --- a/Applications/Browser/Tab.cpp +++ b/Applications/Browser/Tab.cpp @@ -165,6 +165,10 @@ Tab::Tab() m_link_context_menu->popup(screen_position); }; + m_html_widget->on_link_middle_click = [this](auto& href) { + m_html_widget->on_link_click(href, "_blank", 0); + }; + m_html_widget->on_title_change = [this](auto& title) { if (title.is_null()) { m_title = m_html_widget->main_frame().document()->url().to_string();