Opened 9 years ago

Closed 7 years ago

#6664 closed bug (worksforme)

problem add one draggable to many containers

Reported by: mvm Owned by:
Priority: minor Milestone: 2.0.0
Component: ui.draggable Version: 1.8.6
Keywords: Cc:
Blocked by: Blocking:

Description

when delete content wich contain one draggeble jquery object in many containers clearData function execute all Array.prototype methods as handlers this examble reproduce behavior

<html>
<head>
<script>

Array.prototype.buggy = function(){ alert("BUG!!!"); }

</script>

<script src="jquery-1.4.4.js"></script>
<script src="jquery-ui-1.8.6.js"></script>

<script>
function fill()
{
	   $("<LI>")
	   .text( "TEST" )
       .draggable()
	   .appendTo( $( "ul" ) );
}
</script>

</head>
<body>
	<div>
		<ul></ul>
		<ul></ul>
	</div>
	<button onclick="fill()">fill elements</button>
	<button onclick="$('div').html( '<ul></ul><ul></ul>' )">make bug</button>
</body>
</html>

Change History (3)

comment:1 Changed 9 years ago by mvm

when comment ".draggable()" line all be ok!

comment:2 Changed 7 years ago by Scott González

Milestone: TBD2.0.0

comment:3 Changed 7 years ago by mikesherov

Resolution: worksforme
Status: newclosed

Thanks for taking the time to contribute to the jQuery UI project! I can no longer reproduce the issue using the latest jQuery and jQuery UI. http://jsfiddle.net/RrUqs/1/

If you can still reproduce it, please feel free to reply to this ticket with a test case showing the problem. Thanks!

Note: See TracTickets for help on using tickets.