Skip to content

Close/Closed not triggering on button/invoked closing #3

@test-clau-fw

Description

@test-clau-fw

The onClose and onClosed callbacks currently only trigger if the alert is allowed to time out and fade out naturally.
If you close the alert by clicking on the close button, or otherwise force it closed via alert methods, they won't fire.

I hotfixed this in my case by adding the following, after line 66 in bootstrap-notify.js (at the end of Notification.prototype.show):

this.$note.on('close', function(){
self.options.onClosed()
})

this.$note.on('closed', function(){
self.options.onClosed()
})

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions