make auto dismiss of dropdown optional