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

on Hide/Hidden event missing when clicked outside the modal #75

Open
maxchirkov opened this issue Nov 19, 2014 · 1 comment
Open

on Hide/Hidden event missing when clicked outside the modal #75

maxchirkov opened this issue Nov 19, 2014 · 1 comment

Comments

@maxchirkov
Copy link

When allowCancel === true - modal can be closed by clicking outside of its boundaries. The View as far as I can tell doesn't react to this event via hidden.

After testing: cancel, close, ok and click outside - I determined that all actions trigger hidden.bs.modal. First 3 events also trigger hidden in the BootstrapModal, but not the click outside of the modal.

I had to implement a workaround and instead of using this.bind('hidden', callback), I'm using:

$(document).on('hidden.bs.modal', '.modal', {view: this}, callback);

It would be nice if hidden event would cover the click outside of modal boundaries as well.

@benlind
Copy link

benlind commented Jul 12, 2016

I have also noticed this behavior. Since I don't want to have to listen on the hidden.bs.modal event through the document, I have opted to just pass backdrop: 'static' to modalOptions. It would be great if you could provide a permanent fix.

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

2 participants