Capture right-click / control-click events? (oncontextmenu and NativePreviewEvent)

2009-05-20 Thread Gavin Andresen
I want my NativePreviewHandler to intercept oncontextmenu events. Is that possible? Details on what I'm doing: I've got a page with a bunch of hyperlinks on it. If the hyperlink is of a certain form (...author/AUTHOR_ID), then when the user shift- clicks on the link my NativePreviewHandler cal

Re: Porting onEventPreview to 1.6's onPreviewNativeEvent...

2009-04-29 Thread Gavin Andresen
For anybody trying to do something similar, my working code (using event.preventDefault, and using DeferredCommand did the trick): // // Preview events-- look for shift-clicks on paper/author links, and pops up // edit dialog boxes: // public void onPreviewNativeEvent(Event.NativePrevie

Re: Porting onEventPreview to 1.6's onPreviewNativeEvent...

2009-04-29 Thread Gavin Andresen
Right: Instead of cancelling or consuming the NativePreviewEvent object, it looks like I need to preventDefault on the NativeEvent object. I guess I need to find a good DOM event model reference and read it another six or seven times... So now the link is not followed, but my dialog box isn't b

Porting onEventPreview to 1.6's onPreviewNativeEvent...

2009-04-27 Thread Gavin Andresen
First, what I'm trying to do: I've got a page with lots of hyperlinks on it (plain-old tags). When the user shift-clicks on links that match a certain pattern (e.g. /author/AUTHOR_IDENTIFIER), I popup a dialog box that lets them perform an edit INSTEAD of following the link. In GWT 1.5, I did