Merged
Conversation
this fixes a problem where clicking a notification while it is being animated causes it to become uncloseable.
Owner
|
Nice, thanks. 👍 |
Contributor
Author
|
You're welcome, thanks for the great library |
|
Hi! first of all, thanks for the fix. } else {
self.$bar.on('click', function (e) {
self.wasClicked = true;
});
self.$bar.animate(
self.options.animation.open,
self.options.animation.speed,
self.options.animation.easing,
function () {
if (self.options.callback.afterShow) { self.options.callback.afterShow.apply(self); }
self.showing = false;
self.shown = true;
if (self.hasOwnProperty('wasClicked')) {
self.$bar.off('click', function (e) {
self.wasClicked = true;
});
self.close();
}
});
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
closes #265, #282 and #283
this fixes a problem where clicking a notification while it is being animated causes it to become uncloseable.
New behaviour creates a click event and binds it to
self.$bar, setting propertywasClickedthen, once
animationEndwas emitted and noty has applied css and callbacks, a check is done to see if it thewasClickedproperty is set, and if it does it callsclose(). works perfectly from what i have tested of it.