UI Drag Detector Ends Drag When It's Parent Is Changed

The issue is:
When the player is dragging a UI that has a UI Drag Detector as a child, it stops the drag if the UI parent was changed during the drag, and DragEnd fires prematurely.

Featured beta feature: UIDragDetectors


Example Scenario on why Drag Should Be Preserved Even When Parent Is Changed

This case is specific but very annoying to run into:

  1. We create an inventory ScrollingFrame where players can drag items onto the baseplate.
  2. We add UIDragDetectors with a small script to reset the item's position.

Everything works smoothly until we realize that dragging the element outside the frame makes it disappear, because ClipsDescendants is on.


Why not turn off ClipsDescendants?

While turning it off fixes it, it creates another problem with the scrolling GUI.

Now a potential fix would be to reparent it to the ScreenGUI, but this is where we go run into this bug, when we reparent the UI, whilst the player is dragging, it would fire DragEnd like you see here:

– Here is a test place file for the bug
BugReportFile-UIDragDetectors.rbxl (63.0 KB)

Expected behavior

I expect it to behave like this(take note this is achieved through a custom made UI drag script):

Thanks for reading, and I hope to see it fixed in the future, or an option implemented to it.