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

Error in demo: Displaying the notification with the same ID #121

Open
vajnorcan opened this issue Mar 11, 2019 · 1 comment
Open

Error in demo: Displaying the notification with the same ID #121

vajnorcan opened this issue Mar 11, 2019 · 1 comment
Labels
type: bug Indicates an unintended behaviour, unexpected problem, crash

Comments

@vajnorcan
Copy link

vajnorcan commented Mar 11, 2019

Hi there,

I came across a problem in my implementation of the angular-notifier and that is if you display the notificaiton with the same ID, let's say 5x, it will stop working displaying any. If you investigate the dom node, you can see some ghost elements in there

The same behavior can be observed in provided stackblitz
https://stackblitz.com/edit/angular-notifier-demo

Just click the Show notification with ID named 'ID_TEST' button multiple times.

I think what the notifier should do in case of displaying a message with the same id that is already displayed, is to put it in the first position and not to allow any more instances of it, which I believe causes the issue here.

Thank you

@dominique-mueller dominique-mueller added needs repro Indicates that this issue needs a reproduction before further steps can be taken type: bug Indicates an unintended behaviour, unexpected problem, crash and removed needs repro Indicates that this issue needs a reproduction before further steps can be taken labels Oct 18, 2019
@dominique-mueller
Copy link
Owner

Can be reproduced. If a notification should be opened with an ID that already exists, angular-notifier should either:

  • block that notification (and perhaps throw an error?)
  • hide the existing notification with that ID, then open the new notification

I'd favour the second approach, PR's are welcome.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: bug Indicates an unintended behaviour, unexpected problem, crash
Projects
None yet
Development

No branches or pull requests

2 participants