Hey David,
Supressing context menues should not be too difficult, every wannabe
webmaster does it in a futile attempt to prevent downloading his
images, just search the web for it.
Supressing selections would be a combination of javascript and some FF-
specific CSS:
public static native void disableSelectionOn(Element element)/*-{
element.onselectstart = function(){return false;}
}-*/;
public static native void _clearAllSelections()/*-{
var sel ;
if (document.selection && document.selection.empty){
document.selection.empty() ;
} else if ($wnd.getSelection) {
sel=$wnd.getSelection();
if(sel && sel.removeAllRanges)
sel.removeAllRanges() ;
}
}-*/;
.noFocus {
-moz-user-focus: ignore;
-moz-user-input: disabled;
-moz-user-select: none;
}
On Sep 8, 2:55 am, "David E." <[email protected]> wrote:
> I created a word processing type editor with GWT and I need toprevent
> browser events, mostly the browser selection events and right click
> context menu. The program has FocusPanels within FocusPanels within
> FlexTables within VerticalPanels within HorizontalPanels within
> ScrollPanels within Horizontal and VerticalSplitPanels. There can be
> multiple different variations of nesting of widgets.
>
> I need a game plan on how to suppress the browser events that result
> in selections and context menus. I have tried adding onMouseDown,
> onMouseMove, onMouseUp, handlers and thenevent.preventDefault() for
> FocusPanels. I also added clickHandlers andevent.preventDefault() to
> the FlexTables and have had some success with FireFox but still
> doesn't suppress the same way on IE. I tried extending Horizonal and
> VerticalPanels and overriding onBrowserEvent(Eventevent) method,
> addingevent.preventDefault(), but that hasn't had much success.
>
> I would appreciate a plan of action on how to tackle this issue, I'll
> try it and report back with results, until we get it. Thanks in
> advance. We've been using this editor for over a year now with
> success, this is to take it to the next level.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Google Web Toolkit" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/google-web-toolkit?hl=en
-~----------~----~----~----~------~----~------~--~---