Skip to content

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

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

Closed
victor-homyakov opened this issue Dec 17, 2013 · 1 comment
Closed
Labels

Comments

@victor-homyakov
Copy link

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.

@rodneyrehm
Copy link
Contributor

nice catch!

@bbrala bbrala closed this as completed in 7f89f73 Sep 17, 2015
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants