-
-
Notifications
You must be signed in to change notification settings - Fork 65
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
Click events don't work if closeOnOverlayClick is true #25
Comments
This affects React apps badly as React's event handler sits on the document element instead of the actual element you put them on. Is the reason for handling this with event.stopPropagation performance? |
Not really. You're welcome to pull request. |
Solves the conflict using the change proposed in samdark#25.
OK, thanks, done! |
Merged. |
Thanks! On Wed, Jan 27, 2016 at 3:03 AM Alexander Makarov notifications@github.com
|
The patch I grabbed from samdark#25 actually broke the close on overlay click feature, the close call should have localOptions passed in. This makes that actually work again. Sorry for not actually testing the patch properly :/
Here is a bug: https://github.com/samdark/the-modal/blob/master/jquery.the-modal.js#L74 . This block of code stops bubbling of click event, so if we define hendler like
$("body").on("click", ".some_class", doAwesomeActions)
, "awesome actions" won't be done.Solution is cheching class of event target instead of stopping propagation. Like this:
The text was updated successfully, but these errors were encountered: