File tree Expand file tree Collapse file tree 1 file changed +3
-0
lines changed Expand file tree Collapse file tree 1 file changed +3
-0
lines changed Original file line number Diff line number Diff line change @@ -126,6 +126,8 @@ export class DDDraggable extends DDBaseImplement implements HTMLElementExtendOpt
126
126
const ev = DDUtils . initEvent < DragEvent > ( event , { target : this . el , type : 'dragstart' } ) ;
127
127
if ( this . helper !== this . el ) {
128
128
this . _setupDragFollowNodeNotifyStart ( ev ) ;
129
+ // immediately set external helper initial position to avoid flickering behavior and unnecessary looping in `_packNodes()`
130
+ this . _dragFollow ( event ) ;
129
131
} else {
130
132
this . dragFollowTimer = window . setTimeout ( ( ) => {
131
133
delete this . dragFollowTimer ;
@@ -286,6 +288,7 @@ export class DDDraggable extends DDBaseImplement implements HTMLElementExtendOpt
286
288
let img = document . createElement ( 'div' ) ;
287
289
img . style . width = '1px' ;
288
290
img . style . height = '1px' ;
291
+ img . style . position = 'fixed' ; // prevent unwanted scrollbar
289
292
document . body . appendChild ( img ) ;
290
293
e . dataTransfer . setDragImage ( img , 0 , 0 ) ;
291
294
setTimeout ( ( ) => document . body . removeChild ( img ) ) ; // nuke once drag had a chance to grab this 'image'
You can’t perform that action at this time.
0 commit comments