alexbeletsky / ng-notifications-bar

Angular.js component for stylish and flexible top bar notifications.
http://beletsky.net/ng-notifications-bar
149 stars 52 forks source link

Some of notifications stay forever #61

Open ggat opened 7 years ago

ggat commented 7 years ago

When I show more than one notification, sometimes some of them stay forever even if hide : true. I know it might be little information but please try to reproduce. Thanks.

kepoly commented 7 years ago

I show multiple notifications at once and never encountered this issue, what does your code look like ?

tonestrike commented 7 years ago

I am having the same issue as well unfortunately. @ggat did you browserify-shim ng-notifications-bar?

tonestrike commented 7 years ago

I was able to solve this problem by manually setting a hide value to each notification instead of setting it in the config of the app. Not ideal, but not a huge deal either.

lextic commented 7 years ago

Experiencing the same issue.

After taking a quick look at the code, this $timeout seems to be the source of the problem; the index used in Array.splice should be computed within the body of the $timeout, or you have a guaranteed race condition when a sufficient number of notifications are shown at the same time.

There seems to be another pull request (#49) that attempts to fix this, though I haven't tested it.