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() {


private void initDOM(){

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

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


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?