Custom Query (7249 matches)

Filters
 
Or
 
  
 
Columns

Show under each result:


Results (1 - 3 of 7249)

1 2 3 4 5 6 7 8 9 10 11
Ticket Resolution Summary Owner Reporter
#1547 fixed drop callback function runs twice in jQueryUI rdworth pragueexpat
Description

I have one draggable div and one droppable div. Each is nested in its own absolutely positioned parent div (see file source below). The droppable div has a callback function. The problem is that the callback is running twice. If the droppable div is not nested in the parent the callback runs correctly (once). If the parent is not absolutely positioned, the callback also runs correctly. The problem occurs in IE, Firefox and Opera (no others tested). Greedy parameter makes no difference. draggable.js, droppable.js and mouse.js were downloaded from svn on August 28, 2007.

HTML file: (Firebug console.log will output div id each time callback runs)

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
	<head>
		<script type="text/javascript" src="/lib/jquery/jquery-1.1.3.1.js"></script>
		<script type="text/javascript" src="/lib/jqueryui/ui.mouse.js"></script>
		<script type="text/javascript" src="/lib/jqueryui/ui.draggable.js"></script>
		<script type="text/javascript" src="/lib/jqueryui/ui.droppable.js"></script>
		<script type="text/javascript" src="/lib/jquerydimensions/jquery.dimensions.js"></script>
		<style type="text/css">
			#textInput1_container{
				border:1px solid blue;
				position:absolute;
				top:25px;
				left:500px;
				z-Index:100
			}
			#textInput2_container{
				border:1px solid blue;
				position:absolute;
				top:25px;
				left:50px;
				z-Index:100				
			}
			.dd{
				height:30px;
				width:30px;
				border:1px dashed red;
			}
		</style>
	</head>
<body>
	<div id="textInput1_container" class="dragdiv">
		Enter text: <input type="text" id="textInput1" name="textInput1" size="40" />
		<div id="drag_textInput1" class="dd drag">Drag</div>
	</div>
	<div id="textInput2_container" class="dragdiv">
		Enter text: <input type="text" id="textInput2" name="textInput2" size="40" />
		<div id="drop_textInput2" class="dd drop">Drop</div>
	</div>

<script type="text/javascript">

$(function(){
	$('.dragdiv').draggable();
	$('.drop').each(function(){createDropTarget($(this))});
	$('.drag').each(function(){createDragTarget($(this))});
});

createDropTarget = function(jObj){
	(jObj).droppable({accept:'.drag',tolerance:'intersect',greedy:true,drop:function(a,b){console.log(this.id)}});
}

createDragTarget = function(jObj){
	(jObj).draggable({helper:'clone'});
}

</script>
</body>
</html>

#1553 wontfix Error in offset position when dragging element more than once paul pragueexpat
Description

I have a draggable (helper = clone) div that can be dragged to one of several droppable divs. The start function of the drag records the start position of the draggable div using offset(). The first drag records the position correctly. The second is not correct. The third is correct, the fourth is not correct, etc. The incorrect positions are all reported as the same value (its off by 14 pixels to the right)

ui.mouse.js, ui.draggable.js, ui.droppable.js are from new jQueryUI August 28,2007

contact:pragueexpat <at> hotmail.com

Explanation of sample code:

Open this file in Firefox (it uses the console.log of firebug). Drag the red dot to any of the green dots. The console will log the starting position of the red dot div when you start the drag. Notice that every even numbered time you drag the red dot, the position is incorrect.

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
	<head>
		<script type="text/javascript" src="/lib/jquery/jquery-1.1.3.1.js"></script>
		<script type="text/javascript" src="/lib/jqueryui/ui.mouse.js"></script>
		<script type="text/javascript" src="/lib/jqueryui/ui.draggable.js"></script>
		<script type="text/javascript" src="/lib/jqueryui/ui.droppable.js"></script>
		<script type="text/javascript" src="/lib/jquerydimensions/jquery.dimensions.js"></script>
		<style type="text/css">
			.container{
				border:1px solid blue;
				position:absolute;
				z-Index:100;
				width:300px;
				height:60px;			
			}
			#textInput1_container{
				top:25px;
				left:500px;
			}
			#textInput2_container{
				top:25px;
				left:50px;
			}
			#textInput3_container{
				top:100px;
				left:50px;
			}
			#textInput4_container{
				top:175px;
				left:50px;
			}
			#textInput5_container{
				top:250px;
				left:50px;
			}
			#textInput6_container{
				top:100px;
				left:500px;
			}
			#textInput7_container{
				top:175px;
				left:500px;
			}
			.dd{
				display:inline;
				border:1px solid green
			}
		</style>
	</head>
<body>
	<div id="textInput1_container" class="container">
		Enter text: <input type="text" id="textInput1" name="textInput1" size="40" />
		<div id="drag_textInput1" class="dd drag">
		<img src="/images/dragzone.jpg" />
		</div>
	</div>
	<div id="textInput2_container" class="container">
		Enter text: <input type="text" id="textInput2" name="textInput2" size="40" />
		<div id="drop_textInput2" class="dd drop">
		<img src="/images/dropzone.jpg" />
		</div>
	</div>
	<div id="textInput3_container" class="container">
		Enter text: <input type="text" id="textInput3" name="textInput3" size="40" />
		<div id="drop_textInput3" class="dd drop">
		<img src="/images/dropzone.jpg" />
		</div>
	</div>
	<div id="textInput4_container" class="container">
		Enter text: <input type="text" id="textInput4" name="textInput4" size="40" />
		<div id="drop_textInput4" class="dd drop">
		<img src="/images/dropzone.jpg" />
		</div>
	</div>
	<div id="textInput5_container" class="container">
		Enter text: <input type="text" id="textInput5" name="textInput5" size="40" />
		<div id="drop_textInput5" class="dd drop">
		<img src="/images/dropzone.jpg" />
		</div>
	</div>
	<div id="textInput6_container" class="container">
		Enter text: <input type="text" id="textInput6" name="textInput6" size="40" />
		<div id="drop_textInput6" class="dd drop">
		<img src="/images/dropzone.jpg" />
		</div>
	</div>
	<div id="textInput7_container" class="container">
		Enter text: <input type="text" id="textInput7" name="textInput7" size="40" />
		<div id="drop_textInput7" class="dd drop">
		<img src="/images/dropzone.jpg" />
		</div>
	</div>		

<script type="text/javascript">
$(function(){
	$('.dragdiv').draggable();
	$('.drop').each(function(){createDropTarget($(this))});
	$('.drag').each(function(){createDragTarget($(this))});
});

createDropTarget = function(jObj){
	(jObj).droppable({accept:'.drag',tolerance:'intersect',greedy:true});
}

createDragTarget = function(jObj){
	(jObj).draggable({helper:'clone',start:function(){
		var tmp = $('#'+this.id).offset();
		console.log(tmp);
	}});
}

</script>
</body>
</html>

#1632 wontfix dragging table rows doesn't quite work paul crayz
Description

Testing out the draggable/droppable, it doesn't seem to work correctly dragging table rows. The dragging animation itself seems to work fine, but it appears to not correctly track the position of the dragged row vs. the position of the droppable

I have some example code here: http://pastie.caboo.se/97817

In my browser(FF 2.0.0.5 on Linux), the draggable div can be dragged as expected into either the top or bottom droppable div. However the draggable table row can't be dragged into the top droppable at all - it can be dragged into the bottom droppable, but the place where it activates is incorrect(I've noted the place where it activates in my browser with the text "tr drop")

Interestingly enough I get the same results in Opera 9.21

1 2 3 4 5 6 7 8 9 10 11
Note: See TracQuery for help on using queries.