Detecting outside clicks in Vue.js
See this StackOverflow thread
First off, include the directive at the end of this gist.
- On your open button, make sure to use
@click.stopto prevent the open click event from closing your modal.
- On your modal, add the
v-click-outsidedirective and points it at a function to call when clicked outside.