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

Ladybird: Handle forward and backward mouse buttons

We now emit a new signal for backward mouse button's mouseup and forward
mouse button's mouseup which is handled by going back and forward in the
history respectively:))
This commit is contained in:
Baitinq 2022-11-08 02:00:24 +01:00 committed by Andrew Kaster
parent ef553a4b76
commit 982174706b
3 changed files with 17 additions and 0 deletions

View file

@ -73,6 +73,14 @@ Tab::Tab(BrowserWindow* window)
m_hover_label->hide();
});
QObject::connect(m_view, &WebContentView::back_mouse_button, [this] {
back();
});
QObject::connect(m_view, &WebContentView::forward_mouse_button, [this] {
forward();
});
QObject::connect(m_view, &WebContentView::load_started, [this](const URL& url) {
m_location_edit->setText(url.to_string().characters());
m_history.push(url, m_title.toUtf8().data());