Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

close-on-backdrop option in modal doesn't work. #181

Closed
NessunKim opened this issue Mar 28, 2017 · 5 comments
Closed

close-on-backdrop option in modal doesn't work. #181

NessunKim opened this issue Mar 28, 2017 · 5 comments

Comments

@NessunKim
Copy link

After release v0.10.2, the modal doesn't close when click backdrop.

@pi0 pi0 added the Type: Bug label Mar 28, 2017
@pi0
Copy link
Member

pi0 commented Mar 28, 2017

@NessunKim Thanks for reporting. I can confirm too. Will check it soon.

@mosinve
Copy link
Member

mosinve commented Mar 28, 2017

Hmm.... it's because of this

<div key="modal-backdrop"
   :class="['modal-backdrop',{fade: fade}]"
    v-if="visible"
    @click="onClickOut($event)"></div>

But i've tested this :(

@XionDelta
Copy link

XionDelta commented Mar 28, 2017

Sorry to chime in if you already have a solution, but I've just experimented with this and it looks like it works when @click="onClickOut($event)" is moved to the main modal element instead of the modal backdrop element.

I.e.
<div key="modal" :id="id" v-show="visible" :class="['modal',{fade :fade}]" @click="onClickOut($event)">

I haven't been able to see any adverse effects from doing this, but my testing has not been thorough.

@pi0 pi0 closed this as completed in 4e79514 Mar 28, 2017
@pi0
Copy link
Member

pi0 commented Mar 28, 2017

@XionDelta Seems working ;)
@mosinve If you think this is an invalid approach please correct it. (sorry for changing without talking)

@mosinve
Copy link
Member

mosinve commented Mar 28, 2017

It's OK, I think this is the correct variant))

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants