Detect click outside element
<p>How can I detect a click outside my element? I'm using Vue.js so it's gonna be outside my templates element. I know how to do it in Vanilla JS, but I'm not sure if there's a more proper way to do it, when I'm using Vue.js?</p>

<p>This is the solution for Vanilla JS: <a href="https://stackoverflow.com/questions/18893144/javascript-detect-click-event-outside-of-div">Javascript Detect Click event outside of div</a></p>

<p>I guess I can use a better way to access the element?</p>