Vaadin 7 Accordion - Problem 2

Found another problem with Accordion.
Please have a look at the code below that was tested in Chrome and Firefox under Linux. Clicking the of button will remove the tab ‘Me’ containing the button and it adds another tab ‘Next’. However, the caption of the panel (‘Me’) will remain and visible in the ‘Next’ tab added.

public class Application extends UI {

	private final Accordion tabs = new Accordion();

	protected void init(VaadinRequest request) {
		tabs.setHeight(500, Unit.PIXELS);
		Button remove = new Button("Remove 'Me'");
		final Tab me = addTab("Me", remove);
		remove.addClickListener(new Button.ClickListener() {

			public void buttonClick(ClickEvent event) {
				Tab tab = addTab("Next");

	private Tab addTab(String tag, Component... components) {
		VerticalLayout layout = new VerticalLayout();
		layout.addComponent(new Label("On tab: " + tag));
		for(Component c: components) {
		Panel panel = new Panel(tag, layout);
		return tabs.addTab(panel);

Looks like a bug - please
submit a bug report

Ticket #11367