Browser: Open links in a new tab when middle clicked

This commit is contained in:
FalseHonesty 2020-05-06 15:34:10 -04:00 committed by Andreas Kling
parent 0e048f3c4c
commit 8182a709e3
Notes: sideshowbarker 2024-07-19 06:55:36 +09:00

View file

@ -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();