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

Auto close modal when try open twice #12

Open
reualex opened this issue Jun 15, 2021 · 9 comments
Open

Auto close modal when try open twice #12

reualex opened this issue Jun 15, 2021 · 9 comments
Labels
help wanted Extra attention is needed

Comments

@reualex
Copy link

reualex commented Jun 15, 2021

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

@burhanahmeed
Copy link
Member

burhanahmeed commented Jun 15, 2021

I don't get it, so I cannot make a reproduction.
The demo seems fine to me.

Do you mean the fade effect when close the modal with button? 🤔

@reualex
Copy link
Author

reualex commented Jun 15, 2021

I don't get it, so I cannot make a reproduction.
The demo seems fine to me.

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

@burhanahmeed
Copy link
Member

Do you mean when I double click on the modal opener button, it closes immediately?

This is what I found

@reualex
Copy link
Author

reualex commented Jun 17, 2021

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)

@burhanahmeed
Copy link
Member

what browser are you on?

@reualex
Copy link
Author

reualex commented Jun 19, 2021

ubuntu, google chrome

@burhanahmeed
Copy link
Member

I will try to resolve it once I have been able to reproduce it

@burhanahmeed burhanahmeed added the help wanted Extra attention is needed label Aug 1, 2021
@micskubence
Copy link

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.

@burhanahmeed
Copy link
Member

@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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

3 participants