Skip to content

Commit

Permalink
remove scroll in drag & drop context (#69710) (#69759)
Browse files Browse the repository at this point in the history
  • Loading branch information
XavierM authored Jun 24, 2020
1 parent d8a37ad commit c243ada
Showing 1 changed file with 0 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -166,18 +166,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 c243ada

Please sign in to comment.