Closed matthew-dean closed 7 months ago
Okay, I just figured out that the background
prop, set to interactive
turns off click outside behavior. Is there any reason why this is the case? I want an interactive background + clicking on it dismisses the modal. In fact, that's part of the reason for making it interactive.
@matthew-dean
The default behavior of vfm already allow to click outside to close the modal. So you don't have to set background="interactive"
and bind @clickOutside
event to close the modal.
See the basic example of a confirm modal: https://vue-final-modal.org/use-cases/confirm-modal
@hunterliu1003 when you use interactive
and have the modal defined at the same component and you're toggling it using v-model
then clicking outside natively doesn't close the modal.
edited:
Ok, it actually closes in this setup as well on click outside
, but only if you first drag or resize the modal.
Is your feature request related to a problem? Please describe.
Most modals have a setting to click outside (the modal) to close.
Describe the solution you'd like
Click outside to close
Describe alternatives you've considered
A different modal lib, I guess?
Additional context
n/a