ticket.68484: Fix dismiss dialog crash issue cause by show dialog behind foreground