Fix on dim background not hiding when click outside