Skip to content

Commit

Permalink
remove scroll in drag & drop context (#69710) (#69758)
Browse files Browse the repository at this point in the history
  • Loading branch information
XavierM committed Jun 24, 2020
1 parent c6d5d0a commit 6ef3178
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 6ef3178

Please sign in to comment.