remove scroll in drag & drop context (#69710)

This commit is contained in:
Xavier Mouligneau 2020-06-23 17:56:58 -04:00 committed by GitHub
parent 29fbdd56d9
commit e3d01bf450
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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);
}