Skip to content

Event namespace missing! Serious errors occurs when used on multiple containers. #149

@retan

Description

@retan

There's a quite serious error in the code (it made me loose last 3 hours).
The plugin is attaching event handlers without namespace!
It's clearly intended to use namespace but...
in init function:

this.options.name = pluginName + '_' + Math.floor(Math.random() * 1e9);

and afterwards everywhere it uses this.name (not this.options.name), e.g.:

$window.bind('load.' + this.name, function() {

To minimize the modifications, I've changed the line in the init function to:

this.name = pluginName + '_' + Math.floor(Math.random() * 1e9);

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