Hi all,

I want to catch onBlur event with a NativePreviewHandler set in my
entrypoint. But it doesn't handle it.
My code :

public void onModuleLoad() {

Textbox testBox1 = new TextBox();
RootPanel.get().add(textBox1);
Textbox testBox2 = new TextBox();
RootPanel.get().add(textBox2);

Event.addNativePreviewHandler( new NativePreviewHandler(){
    public void onPreviewNativeEvent(NativePreviewEvent event){
          if (DOM.eventGetType(nativeEvent) == Event.ONBLUR)
                Window.alert("" + getWidget(nativeEvent));
            }
    });

});

I've tried to add  textBox1.sinkEvent(Event.ONBLUR) but it's still quiet.

The strange thing is when i override the Textbox class and its
onBrowserEvent method, the ONBLUR event is handled(but it's not the way i
want to catch it). I  expected the NativePreviewHandler handles every kind
of events.

Thanks,

Nicolas

-- 
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.

Reply via email to