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

Two prompt boxes will pop up, and one will not disappear #84

Closed
king-lxt opened this issue Oct 16, 2017 · 13 comments
Closed

Two prompt boxes will pop up, and one will not disappear #84

king-lxt opened this issue Oct 16, 2017 · 13 comments

Comments

@king-lxt
Copy link

I'm a message trigger, two messages are coming at the same time, and two prompts pop up at the same time, but after a certain amount of time, there's another one that won't automatically close

@kaddy645
Copy link

Facing the same issue..did you get any alternative solution @lxt410725

@marcelodolza
Copy link
Owner

I did not understand.
Send the snippet of code that you are using.

@kaddy645
Copy link

kaddy645 commented Oct 17, 2017

izitoast.show({
class:'Note',
title: 'Note',
titleColor: 'white',
message: "hello",
position: 'center',
backgroundColor: '#925619',
close:true,
progressBarColor: 'white',
messageSize: '15px',
messageColor: 'white',
timeout: 2000,
transitionIn: 'fadeInRight',
layout: 2,
maxWidth: '500px',
toastOnce:false,
pauseOnHover: false,
id: 'toastOne',
balloon: true,

});

if there two different (i am using angular here) components and if in each of them i am using izitoast
show..both of them have different id's (toastOne and toastTwo respectively) if the Timeout is same
lets say 2000ms , and onClick i want show both toasts at the same time not one after another, it will
prompts two pop ups at the same time , but after a Timeout is over , it will
close one of them it will still show one of them.
if i am showing two toasts one after another with same Timeout it will work but two toasts at the
same time won't automatically close both of them

@Nnayl
Copy link

Nnayl commented Oct 20, 2017

Hi,

Have same trouble with izitoast.show() on a javascript loop.

for (var i = 0; i < 4; i++) { iziToast.show({ id: null, class: '', title: 'Hey', titleColor: 'red', titleSize: '', titleLineHeight: '', message: 'my first izitoast notification', messageColor: '', messageSize: '', messageLineHeight: '', backgroundColor: '', theme: 'light', // dark color: 'red', // blue, red, green, yellow icon: 'material-icons', iconText: 'done', iconColor: 'red' }); }

@Nnayl
Copy link

Nnayl commented Oct 23, 2017

Actually my alternative solution is to use SetInterval() instead a consensual loop.

`var alert = [
{ title: 'titre 1', message: 'message 1' },
{ title: 'titre 2', message: 'message 2' },
{ title: 'titre 3', message: 'message 3' }
]

      var i = 0;
      var interval = setInterval(function () {

          if (i >= alert.length) {
              clearInterval(interval);
          } else {
              iziToast.show({
                  id: i,
                  class: '',
                  title: alert[i].title,
                  titleColor: 'red',
                  titleSize: '',
                  titleLineHeight: '',
                  message: alert[i].message,
                  messageColor: '',
                  messageSize: '',
                  messageLineHeight: '',
                  backgroundColor: '',
                  theme: 'light', // dark
                  color: 'red', // blue, red, green, yellow
                  icon: 'material-icons',
                  iconText: 'done',
                  iconColor: 'red'
              });
              i++;
          }
      }, 200);`

@Dsmc1
Copy link

Dsmc1 commented Oct 24, 2017

Same issue here. If two different iziToast alerts are shown at the same time, only one will disappear, the other will become stuck. Additionally, the one that stays cannot be closed using the close button.

@marcelodolza
Copy link
Owner

Thanks for reporting, I've already identified the problem, I'll fix it.

@marcelodolza
Copy link
Owner

Could you test this version?
https://github.com/dolce/iziToast/releases/tag/v1.2.0

@marcelodolza
Copy link
Owner

@ShawnMcGrory @Nnayl @kaddy645 @lxt410725

@Dsmc1
Copy link

Dsmc1 commented Nov 5, 2017

@Dolce The issue seems to be resolved with the update. Thank you!

@Nnayl
Copy link

Nnayl commented Mar 8, 2018

Hi,

this problem come back with the 1.3 version :(
My fix with interval statement not work too

@marcelodolza
Copy link
Owner

@Nnayl,
Can you upgrade your package and test again?
https://github.com/dolce/iziToast/releases/tag/v1.3.0
Thanks.

@Nnayl
Copy link

Nnayl commented Mar 26, 2018

Hi,

Work fine.
My bad, whit 1.3 it was broken only on chrome and the origin of problem was a conflict with a chrome extansion (AD block)

Thanks you :)

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

No branches or pull requests

5 participants