I'm wondering if this could be simplified a bit. For instance we not use v-model to control the state of the modal and just emit an event when it should be closed? I seem to have it working fairly well this way.
Also, the clickOutside composition I'm sure has much better accessibility, but as a quick and dirty solution I usually add a @click.prevent to the div that has the modal content and then an actual click listener on the close icon and the backdrop to close the modal.
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
I'm wondering if this could be simplified a bit. For instance we not use v-model to control the state of the modal and just emit an event when it should be closed? I seem to have it working fairly well this way.
Also, the clickOutside composition I'm sure has much better accessibility, but as a quick and dirty solution I usually add a @click.prevent to the div that has the modal content and then an actual click listener on the close icon and the backdrop to close the modal.