Minor fix.
[BUG #8631] Prevent the back action until the dialog is visible.