ashr
ashr

Reputation: 299

Implementing "onclickout" with GWT

I need a way of capturing onclick event when a user clicks out of a FocusPanel(in the form of a dialog box). I need to warn the user to save their work before clicking outside thus losing the panel. I know how to do it in JavaScript but it I am stuck with GWT. Any assistance will be appreciated.

Upvotes: 0

Views: 31

Answers (1)

Andrei Volgin
Andrei Volgin

Reputation: 41099

Every click event provides coordinates of a click. Check that these coordinates are outside of your popup panel.

Alternatively, make your PopupPanel modal, so that users can exit it only by clicking on UI elements that you provide, for example, submit and cancel/close buttons.

Upvotes: 0

Related Questions