The double click doesn't fire in IE6 -- or at least not on the correct
element. This is because the __dispatchDblClickEvent function in
DOMImplIE6::init, calls $wnd.__dispatchEvent(), which uses the "this"
object to find an event listener. However, when __dispatchEvent() is
called from __dispatchDblClickEvent the "this" object is $wnd, when it
should be the element that fired the event.
A simple fix is to replace the $wnd.__dispatchEvent() call with
$wnd.__dispatchEvent.call(this);
Here's a test class:
public class Test implements EntryPoint {
private HTML debug;
public void onModuleLoad() {
debug = new HTML();
FlowPanel panel = new FlowPanel() {
public void onBrowserEvent(Event event) {
debug.setHTML(debug.getHTML() + "<br/>" +
DOM.eventGetTypeString(event));
}
};
panel.sinkEvents(Event.ONCLICK | Event.ONDBLCLICK);
DOM.setStyleAttribute(panel.getElement(), "border", "1px solid
blue");
panel.setSize("100px", "100px");
RootPanel.get().add(panel);
RootPanel.get().add(debug);
}
}