Event.sinkEvents not working on Div

I have a client widget which has a DIV element in it. I am trying to register the click event on DIV elment through Event.sinkEvents. however the browser events never get fired. Here is the piece of code

public class MyWidget extends Widget{
private final DivElement popup = Document.get().createDivElement();

public MyWidget() {

initDOM();
initListeners();
}

private void initDOM(){
popup.setClassName(STYLECLASS);
setElement(popup);
}

public void initListeners(){
Event.sinkEvents(popup, Event.ONCLICK|Event.MOUSEEVENTS);
Event.setEventListener(popup, new EventListener() {

@Override
public void onBrowserEvent(Event event) {
Window.alert(“clicked”); // this never get fired.
event.stopPropagation();
}
});

}

Note that this widget is included in another widget. everything else is working fine only I am not able to get the events on popup div. what am I doing wrong?

below code worked.

Event.sinkEvents(popup, Event.ONCLICK|Event.MOUSEEVENTS); replaced with

sinkEvents(Event.ONCLICK|Event.MOUSEEVENTS); Will sink the events on widget and not on any DIV. after that below brower event got fired.

public void onBrowserEvent(Event event) { Window.alert("clicked"); // this never get fired. event.stopPropagation(); } }); Also, I am still worried whats the reason it wasn’t working on DIV. Any thoughts?

Regards,
Azhar