-
Notifications
You must be signed in to change notification settings - Fork 249
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
Notification not being removed at end of transition #74
Comments
Ah, I found the issue. We were setting |
Come to think of it, it might be a good idea to put a note in the readme about how the autodismiss relies on the |
thanks @philraj There's a note about this: https://github.com/igorprado/react-notification-system#important-1 As you pointed, applying |
Yeah, the |
Hi,
I'm having a very rare bug which is extremely difficult to reproduce, but my best guess at what is happening is that react-notification-system is not detecting
transitionend
in some cases.We needed to customize the popups a fair bit so we set
style={false}
, settransition: opacity 0.3s
on.notification
, and setopacity: 0
on.notification-hidden
.From my understanding of the code, when a
NotificationItem
is instantiated, it hooks into thetransitionend
event. When the library decides it's time to autodismiss the popup, it applies the classnotification-hidden
. If we turn off the styling, we're supposed to make sure that when this class is applied, it kicks off a transition, and at the end of the transition the library callsthis._didNotificationRemoved
from theNotificationSystem
component.That all seems to be working fine 99% of the time, but for some reason, once in a while notifications will fade out (so the opacity transition did occur) but the DOM node hangs around, and blocks interaction of items underneath the hidden popups. If I manually change the opacity of these stubborn invisible notifications in the dev tools, they get properly removed. So somehow the event listener is working, but misses the first transition.
Do you have any idea what could be causing this?
The text was updated successfully, but these errors were encountered: