diff options
-rw-r--r-- | client/src/com/vaadin/client/ui/tabsheet/TabsheetBaseConnector.java | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/client/src/com/vaadin/client/ui/tabsheet/TabsheetBaseConnector.java b/client/src/com/vaadin/client/ui/tabsheet/TabsheetBaseConnector.java index 9944ec5308..283bc1b63b 100644 --- a/client/src/com/vaadin/client/ui/tabsheet/TabsheetBaseConnector.java +++ b/client/src/com/vaadin/client/ui/tabsheet/TabsheetBaseConnector.java @@ -89,6 +89,14 @@ public abstract class TabsheetBaseConnector extends } } + // Detach any old tab widget, should be max 1 + for (Iterator<Widget> iterator = oldWidgets.iterator(); iterator + .hasNext();) { + Widget oldWidget = iterator.next(); + if (oldWidget.isAttached()) { + oldWidget.removeFromParent(); + } + } } @Override |