Removed the blur because that event is raised to early, added an event to the document for closing the dropdown