From 6ef31787cd9d18f489bfe10679b90bbc971e3102 Mon Sep 17 00:00:00 2001 From: Xavier Mouligneau <189600+XavierM@users.noreply.github.com> Date: Tue, 23 Jun 2020 20:34:39 -0400 Subject: [PATCH] remove scroll in drag & drop context (#69710) (#69758) --- .../drag_and_drop/drag_drop_context_wrapper.tsx | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/x-pack/plugins/security_solution/public/common/components/drag_and_drop/drag_drop_context_wrapper.tsx b/x-pack/plugins/security_solution/public/common/components/drag_and_drop/drag_drop_context_wrapper.tsx index 32f05e7c837a7c..3edc1d0d84b692 100644 --- a/x-pack/plugins/security_solution/public/common/components/drag_and_drop/drag_drop_context_wrapper.tsx +++ b/x-pack/plugins/security_solution/public/common/components/drag_and_drop/drag_drop_context_wrapper.tsx @@ -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); }