I suspect that setting causes a JavaScript error that goes off when the focus is given back to the control while closing the dialog. Because of the error the dialog will stay on screen..