Fixes bug where transition could accidentally hide the dialog on show.