sciactive / pnotify

Beautiful JavaScript notifications with Web Notifications support.
https://sciactive.com/pnotify/
Apache License 2.0
3.65k stars 513 forks source link

[Confirm module]The black overlay is'nt removed when the history module isn't used #214

Closed arsenalol69 closed 7 years ago

arsenalol69 commented 8 years ago

I found a bug when using the confirm module whitout the history module : when I close a Modal Confirm dialog, the black overlay isn't removed. After hours of searching, I've found that the objects inside the array PNotify.notices have the option destroy=true, and with I use the history module, this option is set to false. So this part of code is executed and remove too early the object :

if (that.options.destroy) {
   if (PNotify.notices !== null) {
      var idx = $.inArray(that,PNotify.notices);
       if (idx !== -1) {
          PNotify.notices.splice(idx,1);
       }
   }
}

Anyway, thanks for the great job you've done ! :)

NightOwl888 commented 8 years ago

I am closing #225 because it is an exact duplicate of this one. But do note #225 has a demo showing the problem.