CodeSeven / toastr

Simple javascript toast notifications
http://www.toastrjs.com
MIT License
11.94k stars 2.04k forks source link

toastr.remove(toast) doesn't work if the toast is visible #494

Open baseballlover723 opened 7 years ago

baseballlover723 commented 7 years ago

doing toastr.remove(toast) should remove that particular toast, similar to the behavior of toastr.clear(toast). However, due to this line if ($toastElement.is(':visible')) { return; } in removeToast, visible toasts aren't removed.

running the below code in the console of http://codeseven.github.io/toastr/demo.html shows this.

toastr.options.timeOut = 0;
var toast = toastr.info("This is a toast");

setTimeout(function() {
    console.log("I should be removing the toast right now");
    toastr.remove(toast);
}, 2000);
knownasilya commented 7 years ago

Any movement on this?

Shivampio commented 4 years ago

Not working yet