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

hide.bs.modal is firing twice #60

Open
rmvanmeeuwen opened this issue Nov 3, 2016 · 4 comments
Open

hide.bs.modal is firing twice #60

rmvanmeeuwen opened this issue Nov 3, 2016 · 4 comments

Comments

@rmvanmeeuwen
Copy link

Hi,

I try to do some checks on form state inside the modal dialog, before actually closing the modal (by 'x'). So I wrote a piece of code:

$(document).on('hide.bs.modal', '#myeModal', function () {
        alert(this.id);
    });

(I edited the eModal.js so the modal part has id myeModal. But this event is fired twice (once before actually closing (as excpected) and one after the modal has been closed. It seems that something is not correct inside eModal.js? I cannot find the spot where/how to fix it

@saribe
Copy link
Owner

saribe commented Nov 3, 2016

Hide.bs.hide is handled by bootstrap it self, however will take a look
ASAP..

On 3 Nov 2016 10:37, "rmvanmeeuwen" notifications@github.com wrote:

Hi,

I try to do some checks on form state inside the modal dialog, before
actually closing the modal (by 'x'). So I wrote a piece of code:

$(document).on('hide.bs.modal', '#myeModal', function () {
alert(this.id);
});

(I edited the eModal.js so the modal part has id myeModal. But this event
is fired twice (once before actually closing (as excpected) and one after
the modal has been closed. It seems that something is not correct inside
eModal.js? I cannot find the spot where/how to fix it


You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
#60, or mute the thread
https://github.com/notifications/unsubscribe-auth/AEFCJ_Qq24grkRzjMXTrGea7aUue5UlKks5q6bligaJpZM4KoM9C
.

@rmvanmeeuwen
Copy link
Author

ok, thanks!

@Tahiche
Copy link

Tahiche commented Aug 25, 2017

Same here. 'hidden.bs.modal' is firing twice,

@lshe7842
Copy link

lshe7842 commented Feb 4, 2018

Any updates? BTW, seems there's a workaround which actually works:
twbs/bootstrap#9111

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

No branches or pull requests

4 participants