Dialogs

If I have a dialog and show it on a page I cannot seem to get the lostfocus event to fire for the dialog at all. Basically I want to make the dialog close if the user clicks elsewhere on the page.

Is this possible?

Thanks.

[quote=74950:@Tom Russell]If I have a dialog and show it on a page I cannot seem to get the lostfocus event to fire for the dialog at all. Basically I want to make the dialog close if the user clicks elsewhere on the page.

Is this possible?[/quote]

What you want to do does not seem possible with a sheet or modal dialog. However, with a palette dialog, you can close the dialog window in its dismissed event when the user clicks out of the window.

That event never gets called unless you close the window or tab your app is on. Never happens when you click elsewhere.