1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 16:37:35 +00:00

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

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