@@ -272,8 +272,8 @@ export default function sortableContainer(WrappedComponent, config = {withRef: f
272
272
} ;
273
273
274
274
this . initialWindowScroll = {
275
- top : window . scrollY ,
276
- left : window . scrollX ,
275
+ top : ( window . scrollY || window . pageYOffset ) ,
276
+ left : ( window . scrollX || window . pageXOffset ) ,
277
277
} ;
278
278
279
279
const fields = node . querySelectorAll ( 'input, textarea, select' ) ;
@@ -520,8 +520,8 @@ export default function sortableContainer(WrappedComponent, config = {withRef: f
520
520
y : offset . y - this . initialOffset . y ,
521
521
} ;
522
522
// Adjust for window scroll
523
- translate . y -= ( window . scrollY - this . initialWindowScroll . top ) || window . pageYOffset ;
524
- translate . x -= ( window . scrollX - this . initialWindowScroll . left ) || window . pageXOffset ;
523
+ translate . y -= ( ( window . scrollY || window . pageYOffset ) - this . initialWindowScroll . top ) ;
524
+ translate . x -= ( ( window . scrollX || window . pageXOffset ) - this . initialWindowScroll . left ) ;
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 ) || window . pageYOffset ,
575
- left : ( window . scrollX - this . initialWindowScroll . left ) || window . pageXOffset ,
574
+ top : ( ( window . scrollY || window . pageYOffset ) - this . initialWindowScroll . top ) ,
575
+ left : ( ( window . scrollX || window . pageXOffset ) - this . initialWindowScroll . left ) ,
576
576
} ;
577
577
this . newIndex = null ;
578
578
0 commit comments