Added outside-touch-to-close on dialog and hid head when dialog opened.