Skip to content

Commit 79bd033

Browse files
committed
Fix a bug with runaway movement when scrolling
1 parent 2dbb241 commit 79bd033

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

lib/DraggableCore.es6

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -384,7 +384,9 @@ export default class DraggableCore extends React.Component {
384384

385385
this.setState({
386386
lastX: s.lastX + coreEvent.position.deltaX,
387-
lastY: s.lastY + coreEvent.position.deltaY
387+
lastY: s.lastY + coreEvent.position.deltaY,
388+
scrollX: x,
389+
scrollY: y
388390
});
389391

390392
this.props.onDrag(e, coreEvent);

0 commit comments

Comments
 (0)