]> source.dussan.org Git - vaadin-framework.git/commitdiff
Ensure the widget in the selected tab is always visible after a server visit
authorArtur Signell <artur@vaadin.com>
Wed, 21 Mar 2012 12:35:45 +0000 (14:35 +0200)
committerArtur Signell <artur@vaadin.com>
Wed, 21 Mar 2012 13:28:19 +0000 (15:28 +0200)
src/com/vaadin/terminal/gwt/client/ui/VTabsheetPanel.java

index 126b0ebea1e54ab20b90042898e60385edcfad72..68270da85e01edf5a1057e4bb8fc431aa1689361 100644 (file)
@@ -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) {