invertase / angular-toasty

A simple standalone AngularJS module with extensive features that provides growl-style alerts and messages for your app!
MIT License
255 stars 31 forks source link

Unable to get it work with IE11 #10

Open madanv opened 10 years ago

madanv commented 10 years ago

Hi, I have implemented the toasty as suggested in example and it not working in IE11. However, I was able to get it work on Firefox.

Is there something I have missed in configuring it properly. Please help.

mydearxym commented 9 years ago

IE 8 is also unsupported ~ these angluar flash-like plugins seems unfriendly to IEs ...

Krazymins commented 8 years ago

Hi,

It definitely doesn't work with IE11. Is there any fix issue scheduled?

Thanks a lot

Ehesp commented 8 years ago

Hello, what's the error? Don't have the means to test on IE11 at the moment.

Krazymins commented 8 years ago

Hello,

Thanks for your answer Actually when several events are dispatched sequentially, toasty messages are not systematically displayed.

For instance :

EDIT : we've found a solution for this display issue : by encapsulating the push with $apply, it seems working :

scope.$apply(function () {
  // Push up a new toast item
  scope.toasty.push(toast);
});
Ehesp commented 8 years ago

@Krazymins does this fix all issues with the $apply?

Krazymins commented 8 years ago

Hi Ehesp,

Actually it came with another issue. Unfortunately sometimes we have a "$digest already in progress" message. This stinks. So we rollbacked to the previous situation, and removed $apply(...)

We have been able to resolve it by using a $timeout :

$timeout(function () {
    // Push up a new toast item
    scope.toasty.push(toast);
});

It also works if the fix is in our own code, when we call this.toasty.error(...), instead of using the $timeout in the component code.

The issue is when several toasties with the same message are displayed, there can be display issues as explained above.

With the $timemout workaround, everything works perfectly, including on IE11.

It may not be the most beautiful way to resolve the issue, but it works as expected.

Thanks a lot.

Ehesp commented 8 years ago

I suspect the timeout is pushing it onto the next "tick". Can you make a PR for me with the update? I'll test it on Chrome and things.

Cheers

redwyre commented 8 years ago

I seem to be having this issue in chrome, just calling toasty.success every 5 seconds with the same details. The $timeout workaround works for me too.