Ticket #4551 broke jquery.ui.sortable.js downstream

Ticket #4551 broke jquery.ui.sortable.js downstream

WordPress utilizes jQuery UI in its admin area, including jquery.ui.sortable.js to assist in moving metaboxes around on the screen.  When the patch on ticket #4551 was committed, and WordPress updated jQuery UI from 1.7.3 to 1.8.5, it caused a flickering to occur when dragging these metaboxes on screen making it difficult to release the box in the desired position.  Relevant WordPress ticket is http://core.trac.wordpress.org/ticket/16955 that documents the issue and points out the code that was removed which causes the flickering to occur (which is also included below).  I have confirmed that this same issue occurs with jQuery UI 1.8.11 when used in WordPress.  By adding this code back in, the flickering disappears.

  1. //We ignore calculating positions of all connected containers when we're not over them if(item.instance != this.currentContainer && this.currentContainer && item.item[0] != this.currentItem[0]) continue;