Skip to content

Notification not being removed at end of transition #74

Closed
@philraj

Description

@philraj

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}, set transition: opacity 0.3s on .notification, and set opacity: 0 on .notification-hidden.

From my understanding of the code, when a NotificationItem is instantiated, it hooks into the transitionend event. When the library decides it's time to autodismiss the popup, it applies the class notification-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 calls this._didNotificationRemoved from the NotificationSystem 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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions