Double click does not work in IE 8

I have table with ItemClickListener. I tried to implement a click listener, which select the row under the mouse pointer when pressing the left OR right mouse button. It should also react to left double clicks. The double click seems to work fine with Firefox 14.0.1 but not with IE 8.0. I’m using Vaadin 6.7.9 version.

Here is test case for this problem:


public class Test extends Application {

    private Table projectsTable;

    @Override
    public void init() {
        Window mainWindow = new Window();
        projectsTable = new Table();
        projectsTable.setSizeFull();
        projectsTable.setPageLength(0);
        projectsTable.setSelectable(true);
        projectsTable.setMultiSelect(true);
        projectsTable.setImmediate(true);
        projectsTable.setColumnReorderingAllowed(true);

        BeanItemContainer<Project> projectContainer = new BeanItemContainer<Project>(Project.class);
        projectsTable.setContainerDataSource(projectContainer);

        projectsTable.addGeneratedColumn("id", new IdColumnGenerator());
        projectsTable.setColumnHeader("name", "Name");
        projectsTable.setColumnExpandRatio("name", 4.0f);
        projectsTable.setVisibleColumns(new Object[] { "name" });
        projectsTable.setSortContainerPropertyId("name");

        projectsTable.addListener(new ItemClickEvent.ItemClickListener() {
            public void itemClick(ItemClickEvent event) {
                if (event.getButton() == ItemClickEvent.BUTTON_RIGHT) {
                    System.out.println("Right clicked.");
                    projectsTable.setValue(null);
                    projectsTable.select(event.getItemId());
                } else if (event.getButton() == ItemClickEvent.BUTTON_LEFT) {
                    if (event.isDoubleClick()) {
                        System.out.println("Left double clicked.");
                    }
                }
            }
        });

        setMainWindow(mainWindow);
        VerticalLayout layout = (VerticalLayout) mainWindow.getContent();
        layout.addComponent(projectsTable);

        refresh();
    }

    public void refresh() {
        projectsTable.removeAllItems();
        projectsTable.addItem(new Project("a"));
        projectsTable.addItem(new Project("c"));
        projectsTable.addItem(new Project("b"));
        projectsTable.sort();
    }
}

public class Project {

    private String name;

    public Project(String name) {
        this.name = name;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }
}

public class IdColumnGenerator implements Table.ColumnGenerator {

    private int id;

    public Object generateCell(Table source, Object itemId, Object columnId) {
        id++;
        Label idLabel = new Label("" + id);
        return idLabel;
    }
}

-Timo

Anyone?
Or should I file a defect about this?

Bump.
No ideas even with the test code?

-T

Sorry about the lack of response. Yes, in general, you’ll probably get the dev team to notice issues better if you create a ticket. This issue was recently reported in Vaadin 7 (
#9956
) where it actually causes a client-side exception (which is good!) The problem is that IE 8 doesn’t report the mouse button correctly in case of double clicks. We’ll fix this in Vaadin 6 as well.