Skip to content

destroy isn't removing all event handlers #216

@zspitzer

Description

@zspitzer

the current approach in the destroy method doesn't remove all the bound event handlers

$(window).off(namespace); only removes event handlers bound to the window object
https://github.com/rstaib/jquery-bootgrid/blob/master/dist/jquery.bootgrid.js#L1443

as you can see from the output here https://jsbin.com/xavosu/edit?js,output in the console, after destroy there are 8 handlers remaining

at the moment, every LI and TD a.sort header in the table has an individual handler, it probably would be simpler to bind to the TR.header and UL.dropdown-menu's and then check event.currentTarget

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