On 2 nov, 15:48, Carlos Aguayo <[email protected]> wrote:
> Hi,
>
> If I have something like this:
>
> <g:FocusPanel ui:field="main">
>   <g:FlowPanel>
>     <g:TextBox ui:field="textfield1" />
>     <g:TextBox ui:field="textfield2" />
>   </g:FlowPanel>
> </g:FocusPanel>
>
> Where I have elements that are focusable within a FocusPanel. Whenever
> I focus/blur on the textboxes, the focus/blur events are not being
> fired in the FocusPanel, I'd have to click outside the textboxes but
> within the FocusPanel for the event to be fired.

That's unfortunately how focus events work in browsers.

> Is there a way I can get the events fired in the FocusPanel while
> focusing in the textboxes?

Apart from manually adding focus/blur handlers to the textbox to fire
a focus/blur event on the FocusPanel.
...or simply share the same focus/blur handlers between all three
widgets:
   @UiHandler({ "main", "textfield1", "textfield2"})
   void on Focus(FocusEvent event) { ... }

Also see:
http://code.google.com/p/google-web-toolkit/issues/detail?id=1431
(which to me suggests focusin/focusout events could be "emulated" in
non-IE browsers by handling focus/blur events in the capture phase)

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