Call SetModal(false) from a common place that covers all different ways of dismissing a JS modal dialog.