Finally, I found a solution from
http://svenbuschbeck.net/wordpress/2011/02/disable-context-menu-in-gwt/
The solution is similar to mouse up event but this one is using DomHandler.
Canvas canvas = Canvas.createIfSupported();
if (canvas == null) {
return;
}
canvas.addDomHandler(new ContextMenuHandler() {
@Override
public void onContextMenu(ContextMenuEvent event) {
event.preventDefault();
event.stopPropagation();
}
},ContextMenuEvent.getType());
0 comments:
Post a Comment