You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Infinite loop when navigating away from a tab that is being loaded #8699
I have a tabsheet with a couple of tabs on a page. Each tab takes a while to load (e. g. 2000ms delay in onAttach). When the user opens a tab A and then quickly navigates to another tab B before A has been loaded, the UI will enter an infinite loop of switching between Tab A and B that the user can not escape from.
mre.mp4
Expected outcome
Tab B remains open
Minimal reproducible example
vartabSheet = newTabSheet();
add(tabSheet);
for(inti = 0; i < 5; i++){
vartab = newVerticalLayout();
tab.add(newText("Lorem ipsum dolor sit amet"));
tab.addAttachListener(e -> {
try {
Thread.sleep(1000);
} catch (InterruptedExceptionex) {
thrownewRuntimeException(ex);
}
});
tabSheet.add("Tab " + (i + 1), tab);
}
Steps to reproduce
Add the snippet above to a page
Open the page in a browser
Open "Tab 3", then switch back to "Tab 1" before "Tab 3" has been loaded (1000 ms elapsed)
I'm no longer sure that #3846 is the actual cause of this regression since the infinite loop issue isn't reproducible in versions before 25.0. There must have been some other change that caused it. But either way, the fix works, so let's keep it.
Activity
vursen commentedon Feb 16, 2026
It's a regression from #3846
vursen commentedon Feb 17, 2026
I'm no longer sure that #3846 is the actual cause of this regression since the infinite loop issue isn't reproducible in versions before 25.0. There must have been some other change that caused it. But either way, the fix works, so let's keep it.