I created a dialog and initially set its visibility to false in the XML. When the code warrants it, I display the dialog and set its focusButton to 0. I've programmed the dialog to have a OK and a cancel button. I select the cancel button and the "buttonSelected" event gets triggered and the code sets the dialog's visibility back to false. I also have it set the dialog's close property to true.
However, the dialog's "wasClosed" event never gets triggered. Also, the focus doesn't return back to the screen underneath the dialog. If I don't set the dialog's visibility back to false, then I can see that the focus is still on the dialog since the 2 dialog buttons (OK and cancel) can still change focus by pressing the up/down buttons.