Skip to content

Commit ec8f56d

Browse files
author
Anna Bukatar
committed
ACP2E-980: Customizable options Drag and drop issue
1 parent 2e45de7 commit ec8f56d

File tree

1 file changed

+4
-2
lines changed
  • app/code/Magento/Ui/view/base/web/js/dynamic-rows

1 file changed

+4
-2
lines changed

app/code/Magento/Ui/view/base/web/js/dynamic-rows/dnd.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,9 @@ define([
124124
originRecord = $(elem).parents('tr').eq(0),
125125
drEl = this.draggableElement,
126126
$table = $(elem).parents('table').eq(0),
127-
$tableWrapper = $table.parent();
127+
$tableWrapper = $table.parent(),
128+
outerHight =
129+
$table.children('thead').outerHeight() === undefined ? 0 : $table.children('thead').outerHeight();
128130

129131
this.disableScroll();
130132
$(recordNode).addClass(this.draggableElementClass);
@@ -135,7 +137,7 @@ define([
135137
drEl.instanceCtx = this.getRecord(originRecord[0]);
136138
drEl.eventMousedownY = this.getPageY(event);
137139
drEl.minYpos =
138-
$table.offset().top - originRecord.offset().top + $table.children('thead').outerHeight();
140+
$table.offset().top - originRecord.offset().top + outerHight;
139141
drEl.maxYpos = drEl.minYpos + $table.children('tbody').outerHeight() - originRecord.outerHeight();
140142
$tableWrapper.append(recordNode);
141143
this.body.on('mousemove touchmove', this.mousemoveHandler);

0 commit comments

Comments
 (0)