angular-toastr
angular-toastr copied to clipboard
Setting extendedTimeOut to zero, toastr still dismisses after hover
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.
You may set as well these parameters :
- showDuration: 0,
- hideDuration: 0,
- timeOut: 0,
- extendedTimeOut: 0
regards.
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.