Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Incompatible with sweet-alert and sweetAlert2 #85

Open
MichaelJCole opened this issue Feb 20, 2016 · 7 comments
Open

Incompatible with sweet-alert and sweetAlert2 #85

MichaelJCole opened this issue Feb 20, 2016 · 7 comments

Comments

@MichaelJCole
Copy link

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
Copy link

louis49 commented Apr 21, 2016

+1

2 similar comments
@maevaD
Copy link

maevaD commented Apr 21, 2016

+1

@AdrienDesola
Copy link

+1

@teddymeksavanh
Copy link

I have the same problem

@R0binT
Copy link

R0binT commented Apr 21, 2016

+1

1 similar comment
@satyavh
Copy link

satyavh commented Nov 10, 2016

+1

@Gwened
Copy link

Gwened commented Jan 28, 2018

+1
As described in t4t5/sweetalert#538 (comment), 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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

8 participants