Custom Query (7259 matches)

Filters
 
Or
 
  
 
Columns

Show under each result:


Results (10 - 12 of 7259)

1 2 3 4 5 6 7 8 9 10 11 12 13 14
Ticket Resolution Summary Owner Reporter
#9040 duplicate "Uncaught TypeError: Cannot read property 'left' of null" when dragging an element over a sortable leoquijano leoquijano
Description

Hi,

When configuring a droppable area inside of a sortable:

<ul class="mainSortable">
  <li>
    <div class="dropZone"></div>
  </li>
  ...
</ul>

<ul class="anotherSortable">
  <li class="item"></li>
  ...
</ul>

...

jQuery(".mainSortable").sortable({
  refreshPositions: true,
  ...
}

jQuery(".anotherSortable").sortable({ ... });

jQuery(".dropZone").droppable({
  accept: ".item",
  ...
});

And using the "refreshPositions" option on the main sortable, it will fail if an element in the main sortable is removed. The droppable "refreshPositions" method will try to re-calculate positions for all items, even for the removed ones, and jQuery will break with an "Uncaught TypeError: Cannot read property 'left' of null" error.

The offending code inside the refreshPositions() method in jquery-ui.1.8.18.custom.min.js:

var p = t.offset();
item.left = p.left;
item.top = p.top;

I'm adding an IF statement to prevent this, and allow the refreshPositions method to ignore the non-existing item on the main sortable.

var p = t.offset();
if(p) {
  item.left = p.left;
  item.top = p.top;
}

Since I don't see an attach option, patch information is included below:

--- <html>jquery-ui-1.8.18.custom.min.js (<b>12-dic-2012 20:33:51</b>)</html>
+++ <html><b>Current File</b></html>
@@ -1165,8 +1165,10 @@
 			}
 
 			var p = t.offset();
+      if(p) {
 			item.left = p.left;
 			item.top = p.top;
+      }
 		};
 
 		if(this.options.custom && this.options.custom.refreshContainers) {

#3593 notabug "add" function not working correctly klaus.hartl brian
Description

When calling the "add" function, the new LI and DIV elements are added in the wrong place.

Was able to fix the problem by changing:

$li.appendTo(this.element);
$panel.appendTo(this.element[0].parentNode);

To:

$li.appendTo($('ul:first',this.element));
$panel.appendTo(this.element);
#7813 notabug "autoscroll" works incorrectly in FF7 swainet
Description

OK, my browser is FF7, and draggable works a little incorrectly.

You can use the default demo, set the body's height to "1200px" and then drag it. The box scroll more fast than the page itself.

Allright, if you fix it, you can try to set style "overflow-y:scroll" to "html" and test again.

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