Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Plugins are sometimes being registered twice #54

Closed
VizuaaLOG opened this issue Oct 13, 2018 · 0 comments
Closed

Plugins are sometimes being registered twice #54

VizuaaLOG opened this issue Oct 13, 2018 · 0 comments
Labels
Milestone

Comments

@VizuaaLOG
Copy link
Owner

Versions
BulmaJS: 0.7.0 (unreleased) and prior
Browser: Chrome (latest version)
Operating system: Mac OS (Latest version)

Describe the bug
If a plugin is initialised through javascript and it creates and inserts HTML straight away (i.e. creating a message and showing it immediately) when the traverseDOM method is called within the core. It will still create a new plugin instance for the element, even though it already has an instance associated with it.

To Reproduce
Steps to reproduce the behaviour:

  1. Create a message element right after loading in the JS file and show the message immediately
  2. In debug tools, the events are registered twice, and closing the modal will cause the second event listener to throw an error (as the first instance has already dealt with the event and deleted the HTML)

Expected behavior
The traverseDOM method should be able to identify an element that has already been initialised with a plugin.

@VizuaaLOG VizuaaLOG added the bug label Oct 13, 2018
@VizuaaLOG VizuaaLOG added this to the 0.7.0 milestone Oct 13, 2018
VizuaaLOG pushed a commit that referenced this issue Jun 23, 2019
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant