[BUG #8631] Use visibility change to fix not removed back listener on waiting dialog.