Skip to content

$.cleanData is always overridden (jQuery UI detection does not work) #182

@victor-homyakov

Description

@victor-homyakov

At https://github.com/medialize/jQuery-contextMenu/blob/master/src/jquery.contextMenu.js#L47 you are trying to guess when you should override original $.cleanData like jQuery UI does.

But at least with jQuery UI 1.10.X check if (!$.ui || !$.ui.widget) does not work - there is no $.ui.widget, only $.widget at https://github.com/jquery/jquery-ui/blob/master/ui/jquery.ui.widget.js#L28.

As a result, with jQuery UI 1.10 I have 3 implementations of $.cleanData:

  1. From jQuery (original)
  2. From jQuery UI
  3. From contextMenu, the same as in 2.

This has some performance impact when deleting/replacing large DOM subtrees.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions