user2560227
user2560227

Reputation:

How to use Focus on GWT?

I have strange problem.. I want to do this:

I have a focuspanel. In default I want to give him focus:

this.setFocus(true);

I have function onBlur which is able to save all information from focuspanel. But the focus panel doesn's have focus... I must click on him, and in other place to start function onBlur..

Second problem is a... When I have focus and I click on other widget in my focus panel I lose focus.. (Which I have from click on this panel.) It is not expect.

Only way to save information is to fill it in the focus panel, click on the blank space in focus panel and in other place out focus panel.. I don't know how to fix it..

Please, help!

Upvotes: 0

Views: 676

Answers (1)

Hilbrand Bouwkamp
Hilbrand Bouwkamp

Reputation: 13519

A FlowPanel is a div and can't have focus by default, you need to set the tabindex: https://stackoverflow.com/a/3656524/66416

Upvotes: 1

Related Questions