Skip to content

Commit

Permalink
Ladybird/Qt: Only update navigation buttons for current tab
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
jamierocks authored and kalenikaliaksandr committed Jul 13, 2024
1 parent 4c7ef01 commit 7abf47f
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions Ladybird/Qt/Tab.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down

0 comments on commit 7abf47f

Please sign in to comment.