From 6228d899036a8d798bf2164d61fa0e001fe423cf Mon Sep 17 00:00:00 2001 From: Artur Signell Date: Wed, 21 Mar 2012 14:35:45 +0200 Subject: [PATCH] Ensure the widget in the selected tab is always visible after a server visit --- src/com/vaadin/terminal/gwt/client/ui/VTabsheetPanel.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/com/vaadin/terminal/gwt/client/ui/VTabsheetPanel.java b/src/com/vaadin/terminal/gwt/client/ui/VTabsheetPanel.java index 126b0ebea1..68270da85e 100644 --- a/src/com/vaadin/terminal/gwt/client/ui/VTabsheetPanel.java +++ b/src/com/vaadin/terminal/gwt/client/ui/VTabsheetPanel.java @@ -141,8 +141,11 @@ public class VTabsheetPanel extends ComplexPanel { hide(DOM.getParent(visibleWidget.getElement())); } visibleWidget = newVisible; - unHide(DOM.getParent(visibleWidget.getElement())); } + // Always ensure the selected tab is visible. If server prevents a tab + // change we might end up here with visibleWidget == newVisible but its + // parent is still hidden. + unHide(DOM.getParent(visibleWidget.getElement())); } private void hide(Element e) { -- 2.39.5