Won't Fix
Last Updated: 28 Jul 2023 11:57 by ADMIN
Kelvin
Created on: 15 Dec 2022 09:59
Category: KendoReact
Type: Bug Report
1
KendoReact Droppable fail to detect when droppable zone is larger then view port

I am using KendoReact Draggable and Droppable and we find a bug when using it. This bug even happen in the official demo.

The bug is described below:

When a droppable area is rendered out of the originall window size, the droppable cannot detect the onDragEnter() & onDropLeave(), of course onDrop neither.

it seems that kendo did not handle when user scroll while dragging the draggables, so that when the draggables was dragged to a zone out of the original window size, it failed to detect it.(Figure4)

 

I have also found another bug which is when you drag the draggables and scroll, the draggable will somehow detacted with the cursor, but I somehow already fixed it. Maybe it gives some hint for you to fix this bug, maybe.

 

3 comments
ADMIN
Konstantin Dikov
Posted on: 23 Dec 2022 20:15

Hello Kelvin,

Following the provided steps I was able to observe the issue, which is indeed to the scrolling. Please note that the drag button position is set manually, so when scrolling occurs, you can just add the scrollY (and scrollY for horizontal scrolling) to the calculation of the drag position. I have modified one of the examples to include the "scrollY" and the issue seems to be resolved as expected:

  const handleDrag = React.useCallback(
    (event) => {
      console.log(event.scrollY);
      let zoomRation = 1; //Math.round(window.devicePixelRatio);
      if (!button.current || !button.current.element || !initial) {
        return;
      }
      const transform = `translate(${
        (event.clientX - initial.x) * zoomRation
      }px, ${(event.clientY - initial.y + event.scrollY) * zoomRation}px)`;
      button.current.element.style.transition = 'none';
      button.current.element.style.transform = transform;
    },
    [initial]
  );

Please let me know if everything works as expected on your side too.

 

Regards,
Konstantin Dikov
Progress Telerik

Love the Telerik and Kendo UI products and believe more people should try them? Invite a fellow developer to become a Progress customer and each of you can get a $50 Amazon gift voucher.

Kelvin
Posted on: 19 Dec 2022 02:19

1. enlarge the screen until you no longer completely see all the four droppables

2. drag the draggable downward (it will auto scroll down)

3. try to drag the draggable to the most bottom part of the droppable. You will find that the droppable is not detectable and when you release, the draggable will move back to the originally position (according to your official code)

 

ref url:

https://www.telerik.com/kendo-react-ui/components/utils/examples/drag-and-drop/overview/func/?theme=default-ocean-blue&themeVersion=5.10.0

 

attched is the recording to reproduce the bug.

Attached Files:
ADMIN
Konstantin Dikov
Posted on: 17 Dec 2022 12:19

Hello Kelvin,

Thank you for contacting us.

I have tried different scenarios with the provided information, but I have to say that I was not able to reproduce any issues while changing the window size or scrolling. Please provide a list with the exact steps to reproduce the issue or record a short video demonstrating it.

Looking forward to your reply. 

 

Regards,
Konstantin Dikov
Progress Telerik

Love the Telerik and Kendo UI products and believe more people should try them? Invite a fellow developer to become a Progress customer and each of you can get a $50 Amazon gift voucher.