display: close any open dialog if the panel is destroyed