mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-04-22 20:45:14 +00:00
Browser: Open links in a new tab when middle clicked
This commit is contained in:
parent
0e048f3c4c
commit
8182a709e3
Notes:
sideshowbarker
2024-07-19 06:55:36 +09:00
Author: https://github.com/FalseHonesty Commit: https://github.com/SerenityOS/serenity/commit/8182a709e3e Pull-request: https://github.com/SerenityOS/serenity/pull/2137
1 changed files with 4 additions and 0 deletions
|
@ -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();
|
||||
|
|
Loading…
Add table
Reference in a new issue