From 7abf47f4bf5039869a8f38c12f1be62bba97e463 Mon Sep 17 00:00:00 2001 From: Jamie Mansfield Date: Sat, 13 Jul 2024 12:57:06 +0100 Subject: [PATCH] Ladybird/Qt: Only update navigation buttons for current tab This resolves a bug where if you opened a link in a new tab and quickly went back to the original, the navigation buttons would update for the new page shortly after. --- Ladybird/Qt/Tab.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Ladybird/Qt/Tab.cpp b/Ladybird/Qt/Tab.cpp index 6765aeca272..a3e0bf6583e 100644 --- a/Ladybird/Qt/Tab.cpp +++ b/Ladybird/Qt/Tab.cpp @@ -905,6 +905,9 @@ void Tab::update_hover_label() void Tab::update_navigation_buttons_state() { + if (m_window->current_tab() != this) + return; + m_window->go_back_action().setEnabled(m_can_navigate_back); m_window->go_forward_action().setEnabled(m_can_navigate_forward); }