@@ -283,7 +283,7 @@ export default function sortableContainer(WrappedComponent, config = {withRef: f
283
283
] ; // Convert NodeList to Array
284
284
285
285
clonedFields . forEach ( ( field , index ) => {
286
- if ( field . type !== 'file' && fields [ index ] ) {
286
+ if ( field . type !== 'file' && fields [ index ] ) {
287
287
field . value = fields [ index ] . value ;
288
288
}
289
289
} ) ;
@@ -513,15 +513,15 @@ export default function sortableContainer(WrappedComponent, config = {withRef: f
513
513
514
514
updatePosition ( e ) {
515
515
const { lockAxis, lockToContainerEdges} = this . props ;
516
-
516
+
517
517
const offset = this . getOffset ( e ) ;
518
518
const translate = {
519
519
x : offset . x - this . initialOffset . x ,
520
520
y : offset . y - this . initialOffset . y ,
521
521
} ;
522
522
// Adjust for window scroll
523
- translate . y -= ( window . scrollY - this . initialWindowScroll . top ) ;
524
- translate . x -= ( window . scrollX - this . initialWindowScroll . left ) ;
523
+ translate . y -= ( window . scrollY - this . initialWindowScroll . top ) || window . pageYOffset ;
524
+ translate . x -= ( window . scrollX - this . initialWindowScroll . left ) || window . pageXOffset ;
525
525
526
526
this . translate = translate ;
527
527
@@ -571,8 +571,8 @@ export default function sortableContainer(WrappedComponent, config = {withRef: f
571
571
top : this . offsetEdge . top + this . translate . y + deltaScroll . top ,
572
572
} ;
573
573
const scrollDifference = {
574
- top : ( window . scrollY - this . initialWindowScroll . top ) ,
575
- left : ( window . scrollX - this . initialWindowScroll . left ) ,
574
+ top : ( window . scrollY - this . initialWindowScroll . top ) || window . pageYOffset ,
575
+ left : ( window . scrollX - this . initialWindowScroll . left ) || window . pageXOffset ,
576
576
} ;
577
577
this . newIndex = null ;
578
578
0 commit comments