From 8bb05d23e2c49ecbe2f83a3552efb0a93c48bb85 Mon Sep 17 00:00:00 2001 From: Marc-Andre Lafortune Date: Sun, 7 Oct 2012 02:35:01 -0400 Subject: Widget: Destroy only when element is the actual target. Fixes #8652 - Widget: Destroy only when element is the actual target. --- tests/unit/widget/widget_core.js | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'tests') diff --git a/tests/unit/widget/widget_core.js b/tests/unit/widget/widget_core.js index 848579a1d..31f2b9ccf 100644 --- a/tests/unit/widget/widget_core.js +++ b/tests/unit/widget/widget_core.js @@ -1167,6 +1167,13 @@ test( "._trigger() - instance as element", function() { $( "#widget" ).testWidget().detach(); }); }); + + test( "destroy - remove event bubbling", function() { + shouldDestroy( false, function() { + $( "
child
" ).appendTo( $( "#widget" ).testWidget() ) + .trigger( "remove" ); + }); + }); }()); test( "redefine", function() { -- cgit v1.2.3