@@ -684,14 +684,17 @@ export default class Preview extends PreviewCollection {
684
684
* @param {GroupPositionCache } groupPosition
685
685
*/
686
686
private onDroppingMouseMove ( event : JQuery . Event , group : JQuery < HTMLElement > , groupPosition : GroupPositionCache ) {
687
+ const elementChildrenParent = group . parents ( ".element-children" ) ;
687
688
// Only initiate this process if we're within the group by a buffer to allow for sortable to function correctly
688
689
if (
689
690
this . dropOverElement &&
690
691
event . pageY > groupPosition . top + 20 &&
691
692
event . pageY < ( groupPosition . top + groupPosition . outerHeight ) - 20
692
693
) {
693
694
// Disable the parent sortable instance
694
- group . parents ( ".element-children" ) . sortable ( "option" , "disabled" , true ) ;
695
+ if ( elementChildrenParent . data ( "sortable" ) ) {
696
+ elementChildrenParent . sortable ( "option" , "disabled" , true ) ;
697
+ }
695
698
696
699
const currentX = event . pageX - groupPosition . left ;
697
700
this . dropPosition = this . dropPositions . find ( ( position ) => {
@@ -708,7 +711,9 @@ export default class Preview extends PreviewCollection {
708
711
}
709
712
} else if ( this . dropOverElement ) {
710
713
// Re-enable the parent sortable instance
711
- group . parents ( ".element-children" ) . sortable ( "option" , "disabled" , false ) ;
714
+ if ( elementChildrenParent . data ( "sortable" ) ) {
715
+ elementChildrenParent . sortable ( "option" , "disabled" , false ) ;
716
+ }
712
717
this . dropPosition = null ;
713
718
this . dropPlaceholder . removeClass ( "left right" ) ;
714
719
}
0 commit comments