Close dropdown when trigger element loses focus