fix CSS when pressing Dialog close icon, fixes #17501