Fix opening closed widget areas when dragging a widget over them.
Props polevaultweb. Fixes #13524. git-svn-id: https://develop.svn.wordpress.org/trunk@33088 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
ade1ffde80
commit
0f7208a1ee
@ -128,7 +128,7 @@ wpWidgets = {
|
|||||||
* Opens and closes previously closed Sidebars when Widgets are dragged over/out of them.
|
* Opens and closes previously closed Sidebars when Widgets are dragged over/out of them.
|
||||||
*/
|
*/
|
||||||
sidebars.droppable( {
|
sidebars.droppable( {
|
||||||
tolerance: 'pointer',
|
tolerance: 'intersect',
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Open Sidebar when a Widget gets dragged over it.
|
* Open Sidebar when a Widget gets dragged over it.
|
||||||
@ -146,6 +146,7 @@ wpWidgets = {
|
|||||||
if ( $wrap.hasClass( 'closed' ) ) {
|
if ( $wrap.hasClass( 'closed' ) ) {
|
||||||
wpWidgets.hoveredSidebar = $wrap;
|
wpWidgets.hoveredSidebar = $wrap;
|
||||||
$wrap.removeClass( 'closed' );
|
$wrap.removeClass( 'closed' );
|
||||||
|
sidebars.sortable( 'refresh' );
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
@ -169,6 +170,7 @@ wpWidgets = {
|
|||||||
distance: 2,
|
distance: 2,
|
||||||
containment: '#wpwrap',
|
containment: '#wpwrap',
|
||||||
tolerance: 'pointer',
|
tolerance: 'pointer',
|
||||||
|
refreshPositions: true,
|
||||||
start: function( event, ui ) {
|
start: function( event, ui ) {
|
||||||
var height, $this = $(this),
|
var height, $this = $(this),
|
||||||
$wrap = $this.parent(),
|
$wrap = $this.parent(),
|
||||||
|
Loading…
Reference in New Issue
Block a user