Skip to content

[Advanced Select, Dropdown, ...] Memory leak when calling autoInit() repeatedly (e.g. due to ajax) #429

Closed
@oliverhaas

Description

@oliverhaas

Summary

Calling autoInit() repeatedly will lead to a memory leak

Steps to Reproduce

  1. Have a page with Advanced Select or Dropdown (possibly more)
  2. Use autoInit() with ajax like described in the docs https://preline.co/docs/preline-javascript.html
  3. With every ajax request, duplicate event listeners are registered on the window
    image

Demo Link

None

Expected Behavior

No response

Actual Behavior

No response

Screenshots

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingenhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions