Monday, May 31, 2010

ClickHandler not called on second click

I have a button with a ClickHandler. When I move the mouse over the
button and click the button, the ClickHandler is called. When I do no
move the mouse away from the button, the ClickHandler is not called on
any subsequent clicks. I have to move the mouse away from the button
and back. Then the ClickHandler is called when I click again.

To investigate, I have added a MouseDownHandler and a MouseUpHandler.
These are called on subsequent clicks, only the ClickHandler is not
called.
As the focus stays on the button, I have tried hitting the enter key.
This triggers calling the ClickHandler.

I 've tried adding a DeferredCommand to the ClickHandler with a
variaty of actions(remove focus, remove focus and set focus again),
but this does not change anything.

Environment
- GWT 2.0.3
- Vista
- Chrome 6.0.408.1 dev / Firefox 3.5.9/ Internet Explorer 7.0

There are several posts in this forum that describe a similar
behaviour (e.g.
http://groups.google.com/group/google-web-toolkit/browse_thread/thread/aa9ce024e173390e/65802ce6da9482e7?lnk=gst&q=second+click#65802ce6da9482e7)
but none have a solution.

Any idea how to solve this?

Thanks in advance,

Danny

--
You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to google-web-toolkit+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.

No comments:

Post a Comment