meteorhacks / zones

Zone.js integration for meteor
MIT License
30 stars 11 forks source link

Incompatible with sweet-alert and sweetAlert2 #85

Open MichaelJCole opened 8 years ago

MichaelJCole commented 8 years ago

Hey, there's a bug in the sweetAlert library, which probably no one cares about, but zonejs prevents sweetAlert from making it's callback:

swal({
  title: "Are you sure?",
  text: "You will not be able to recover this imaginary file!",
  type: "warning",
  showCancelButton: true,
  confirmButtonColor: "#DD6B55",
  confirmButtonText: "Yes, delete it!",
  closeOnConfirm: false,
  html: false
}, function(){
  swal("Deleted!",
  "Your imaginary file has been deleted.",
  "success");
});

Somewhere in sweetAlert this bug happens:

Error: Failed to execute 'removeChild' on 'Node': parameter 1 is not of type 'Node'.
TypeError: Failed to execute 'removeChild' on 'Node': parameter 1 is not of type 'Node'.
    at TypeError (native)
    at s (https://dashboard-dev.bigsmall.io/packages/patrickml_swal.js?06d775f51a9debdd71fd5de7eb0594d0e94eed1b:32:7559)
    at HTMLButtonElement.p (https://dashboard-dev.bigsmall.io/packages/patrickml_swal.js?06d775f51a9debdd71fd5de7eb0594d0e94eed1b:32:3375)

w/o zones, nobody knows and my callback happens

w/ zones, the callback doesn't happen.

Is there a way to wrap calls in something to protect them from zones catching the call?

Thanks!

Mike

louis49 commented 8 years ago

+1

maevaD commented 8 years ago

+1

AdrienDesola commented 8 years ago

+1

teddymeksavanh commented 8 years ago

I have the same problem

R0binT commented 8 years ago

+1

satyavh commented 7 years ago

+1

Gwened commented 6 years ago

+1 As described in https://github.com/t4t5/sweetalert/issues/538#issuecomment-215129915, SweetAlert (tested on 1.1.1) is completely broken when meteorhacks:zones is added: the first time you call SweetAlert, it 'saves' the callback and always goes back to that particular callback next time you call SweetAlert! After removing the module, the issue disappears.