mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-13 03:29:49 +00:00
LibWeb: Pass link target to HtmlView's on_link_click callback
This commit is contained in:
parent
95b51e857d
commit
061205b3b3
Notes:
sideshowbarker
2024-07-19 07:20:47 +09:00
Author: https://github.com/linusg
Commit: 061205b3b3
Pull-request: https://github.com/SerenityOS/serenity/pull/1939
5 changed files with 5 additions and 4 deletions
|
@ -133,7 +133,7 @@ Tab::Tab()
|
|||
update_bookmark_button(url.to_string());
|
||||
};
|
||||
|
||||
m_html_widget->on_link_click = [this](auto& url) {
|
||||
m_html_widget->on_link_click = [this](auto& url, auto&) {
|
||||
if (url.starts_with("#")) {
|
||||
m_html_widget->scroll_to_anchor(url.substring_view(1, url.length() - 1));
|
||||
} else {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue