Hide box when click outside

If you use the onClick event function then you will have that and so you would be better off with the onMouseIn and onMouseOut event functions if you don’t want the users mouse icon to change.

See here for more info.
https://support.wix.com/en/article/corvid-reacting-to-user-actions-using-events
https://support.wix.com/en/article/corvid-tutorial-adding-custom-interactivity-with-events