-
-
Notifications
You must be signed in to change notification settings - Fork 4
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
Auto close modal when try open twice #12
Comments
I don't get it, so I cannot make a reproduction. Do you mean the fade effect when close the modal with button? 🤔 |
Sorry, try to nuxt demo - https://codesandbox.io/s/damp-architecture-b856k?file=/pages/index.vue, and try faster second open |
Do you mean when I double click on the modal opener button, it closes immediately? This is what I found |
So, I created the video, you can see it - https://drive.google.com/file/d/1aFmC2dTqMEGM_p-JtdfmZ6D8WK3y1Oqy/view?usp=sharing (I didn't click twice, window close by self) |
what browser are you on? |
ubuntu, google chrome |
I will try to resolve it once I have been able to reproduce it |
I edited your code, in Container.vue i moved the 'this.$emit("on-close", false);' line outside the settimeout (moving it before the settimeout) this fixed the auto close issue, also in withHeader.vue removed the @click event from the modal title h4 tag fixing a console error when clicking on the title. |
@micskubence Cheers! Thanks a lot. It's been a while I haven't look at the code, I will try to look at the code again when I'm free. |
If we try open modal, next step - close and then open - modal window automatically will be closed. You can see it in your demo - https://codesandbox.io/s/vue-modal-2-vue2-forked-rfxwr
The text was updated successfully, but these errors were encountered: