Skip to content

Commit

Permalink
remove scroll in drag & drop context (#69710)
Browse files Browse the repository at this point in the history
  • Loading branch information
XavierM committed Jun 23, 2020
1 parent 24d59ec commit 1db8dc3
Showing 1 changed file with 0 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -168,18 +168,6 @@ export const DragDropContextWrapper = connector(DragDropContextWrapperComponent)
DragDropContextWrapper.displayName = 'DragDropContextWrapper';

const onBeforeCapture = (before: BeforeCapture) => {
const x =
window.pageXOffset !== undefined
? window.pageXOffset
: (document.documentElement || document.body.parentNode || document.body).scrollLeft;

const y =
window.pageYOffset !== undefined
? window.pageYOffset
: (document.documentElement || document.body.parentNode || document.body).scrollTop;

window.onscroll = () => window.scrollTo(x, y);

if (!draggableIsField(before)) {
document.body.classList.add(IS_DRAGGING_CLASS_NAME);
}
Expand Down

0 comments on commit 1db8dc3

Please sign in to comment.