Skip to content

Commit

Permalink
Fix issue processwire/processwire-issues#531 repeater within a fields…
Browse files Browse the repository at this point in the history
…et depth changes unexpectedly when repeater item dragged up/down.
  • Loading branch information
ryancramerdesign committed Mar 14, 2018
1 parent 1045acc commit 27b6141
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
Expand Up @@ -499,9 +499,6 @@ function InputfieldRepeater($) {
var prevDepth = parseInt($depth.val());
var left = ui.position.left;

// AdminThemeDefault has something different going on with the left positions, so we adjust for that here
if(!isAdminDefault) left -= depthSize;

if(left < 0) {
depth = prevDepth - Math.round(Math.abs(left) / depthSize);
// console.log('decrease depth to: ' + depth);
Expand Down Expand Up @@ -555,6 +552,7 @@ function InputfieldRepeater($) {
$item.css('margin-left', targetLeft + 'px');
}
});
$inputfieldRepeater.children('.InputfieldContent').css('position', 'relative');
}

/**
Expand Down

0 comments on commit 27b6141

Please sign in to comment.