File tree Expand file tree Collapse file tree 2 files changed +11
-6
lines changed
code/Magento/Ui/view/base/web/js/dynamic-rows
design/adminhtml/Magento/backend/web/css/source/forms/fields Expand file tree Collapse file tree 2 files changed +11
-6
lines changed Original file line number Diff line number Diff line change @@ -199,9 +199,13 @@ define([
199
199
/**
200
200
* Mouse up handler
201
201
*/
202
- mouseupHandler : function ( ) {
202
+ mouseupHandler : function ( event ) {
203
203
var depElementCtx ,
204
- drEl = this . draggableElement ;
204
+ drEl = this . draggableElement ,
205
+ pageY = isTouchDevice ? event . originalEvent . touches [ 0 ] . pageY : event . pageY ,
206
+ positionY = pageY - drEl . eventMousedownY ;
207
+
208
+ drEl . depElement = this . getDepElement ( drEl . instance , positionY ) ;
205
209
206
210
if ( drEl . depElement ) {
207
211
depElementCtx = this . getRecord ( drEl . depElement . elem [ 0 ] ) ;
@@ -285,12 +289,12 @@ define([
285
289
rec = collection . eq ( i ) ;
286
290
287
291
if ( position === 'before' ) {
288
- rangeStart = collection . eq ( i ) . position ( ) . top ;
289
- rangeEnd = rangeStart + this . step ;
292
+ rangeStart = collection . eq ( i ) . position ( ) . top - this . step ;
293
+ rangeEnd = rangeStart + this . step * 2 ;
290
294
className = this . separatorsClass . top ;
291
295
} else if ( position === 'after' ) {
292
- rangeEnd = rec . position ( ) . top + rec . height ( ) ;
293
- rangeStart = rangeEnd - this . step ;
296
+ rangeEnd = rec . position ( ) . top + rec . height ( ) + this . step ;
297
+ rangeStart = rangeEnd - this . step * 2 ;
294
298
className = this . separatorsClass . bottom ;
295
299
}
296
300
Original file line number Diff line number Diff line change 188
188
189
189
.admin__dynamic-rows {
190
190
& ._dragged {
191
+ opacity : .95 ;
191
192
position : absolute ;
192
193
z-index : 999 ;
193
194
}
You can’t perform that action at this time.
0 commit comments