@@ -0,0 +1,987 @@
+package com.vaadin.tests.components.select;%0A%0Aimport com.vaadin.event.FieldEvents;%0Aimport com.vaadin.tests.components.TestBase;%0Aimport com.vaadin.ui.ComboBox;%0A%0Apublic class FocusListenerBreaksDropdownMenu extends TestBase %7B%0A%0A    @Override%0A    protected void setup() %7B%0A        final ComboBox comboBox = new ComboBox();%0A        for (int i = 0; i %3C 5; ++i) %7B%0A            comboBox.addItem(%22Item %22 + i);%0A        %7D%0A%0A        comboBox.addListener(new FieldEvents.FocusListener() %7B%0A            public void focus(FieldEvents.FocusEvent event) %7B%0A                comboBox.addItem();%0A            %7D%0A        %7D);%0A%0A        comboBox.setImmediate(true);%0A        addComponent(comboBox);%0A    %7D%0A%0A    @Override%0A    protected String getDescription() %7B%0A        return %22Clicking the dropdown arrow on a not-already-focused ComboBox %22%0A                + %22breaks the dropdown list if a FocusListener adds or removes items%22;%0A    %7D%0A%0A    @Override%0A    protected Integer getTicketNumber() %7B%0A        return 8321;%0A    %7D%0A%0A%7D%0A

Test case for #8321