title: Function that detects click outside of element runs when click is inside of element
body: <p>I'm trying to close an element when I detect a click outside of the element itself, but it seems to be closing the element anyway whenever I click on it.</p>
  
  <p>EDIT: Figured it out.</p>