Question

When I left click (in dartium) my break point on my listener gets hit, but when I right click it doesn't, have I set up something wrong or is this a known bug?

Dart Editor version 0.6.21_r26639 Dart SDK version 0.6.21.3_r26639

html.onClick.listen((MouseEvent event){

  if(event.button == 2){ //left click hits breakpoint on this line - right clicking doesnt

    contextMenu.show(this, left: event.clientX - 5, top: event.clientY - 5);

    contextMenu.html.onMouseOut.listen((Event event){

      contextMenu.hide();

    });

  }

});
Was it helpful?

Solution

Right clicks are handled with onContextMenu.

MDN link

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top