angular-toastr icon indicating copy to clipboard operation
angular-toastr copied to clipboard

Setting extendedTimeOut to zero, toastr still dismisses after hover

Open smlombardi opened this issue 8 years ago • 2 comments

I would like a toastr to stay open unless explicitly closed by the user.

Setting timeOut: 0 keeps it open, but then if the toastr is hovered, it closes after second. So I have tried:

     closeButtonWarning: function () {
        toastr.warning('Low Funds. <a href="somelink">Add postage</a>', {
          closeButton: true,
          timeOut: 0,
          extendedTimeOut: 0
        });
      },

But it still closes after hover. I can set something like extendedTimeOut: 10000, but it will still close (after 10 seconds of course). I don't want it to close by itself at all.

smlombardi avatar Oct 27 '17 17:10 smlombardi

You may set as well these parameters :

  • showDuration: 0,
  • hideDuration: 0,
  • timeOut: 0,
  • extendedTimeOut: 0

regards.

marcoooo avatar Nov 21 '17 09:11 marcoooo

I also came across the hover feature which happens to be rather confusing for me. But apparently my use case of not hiding after hover is not the regular case. In CodeSeven/toastr I am able to set closeOnHover = false to achieve this behavior. With this one I'd need to give up any timeout in order to not close on hover.

i.e., those two behave rather identically

toastr.success('Stay open after hover.', {timeOut: 20000, closeOnHover: false}); // CodeSeven/toastr
toastr.success('Stay open after hover.', {timeOut: 20000, extendedTimeOut: 20000}); // angular-toastr

Anyway, since I spent a while in the source code to find out, would it make sense to document the hover feature focused on this 'stay open after hover' use case? You can easily overlook that part currently.

Husterknupp avatar Mar 07 '18 11:03 Husterknupp