Hide widget on click away when using input