`$.cleanData` is always overridden (jQuery UI detection does not work)
victor-homyakov opened this issue · 1 comments
victor-homyakov commented
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
:
- From jQuery (original)
- From jQuery UI
- From contextMenu, the same as in 2.
This has some performance impact when deleting/replacing large DOM subtrees.
rodneyrehm commented
nice catch!