From 1df15fabb459b7b824ec9a7827dce4ffede78683 Mon Sep 17 00:00:00 2001 From: Scott González Date: Sat, 20 Sep 2008 13:49:13 +0000 Subject: Core: Fixed #3457: Removing elements causes instantiated plugins to be destroyed again. --- ui/ui.core.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/ui/ui.core.js b/ui/ui.core.js index 2846e8e43..50140d73e 100644 --- a/ui/ui.core.js +++ b/ui/ui.core.js @@ -13,7 +13,10 @@ var _remove = $.fn.remove; $.fn.remove = function() { - $("*", this).add(this).triggerHandler("remove"); + // TODO: add comment about why we can't use .trigger() + $("*", this).add(this).each(function() { + $(this).triggerHandler("remove"); + }); return _remove.apply(this, arguments ); }; -- cgit v1.2.3