Drag and drop not working correctly after updating to 4.18

After updating to 4.18, I noticed that visuals of any drag & drop operations in the game won’t follow the mouse correctly, and instead are positioned to the left and above the cursor. Even more strange, the distance from the cursor gets larger as it travels to the left or bottom of the screen.
The drag and drop was working normally before the update on 4.17.

Just tested this on a completely new First Person Example project. Same behavior occurs.
The visual of the drag operation is to the left and up of the cursor position and the distance scales with screen position on the respective axes.

Not sure if it helps, but I’m using a QHD display.
EDIT: I tried it on a FHD display with no change

Hello DELTA_12,

I have a couple of questions about your issue to help investigate further.

  1. What was the mouse behavior like for your project in 4.17?
  2. Does the issue occur in a clean project for you in 4.17?

Thanks!

In 4.17 the behaviour was normal. It happens in a clean project as well.

Hello again DELTA_12,

I believe that the issue you are experiencing may be related to how you are using the pivot on the “Create Drag Drop Operation” node, changing this pivot to Center Center with your offset should allow your dragged objects to line up with your cursor as intended, using Center Center will allow the dagged visual to be in the center with the mouse; however, there are other pivot options that may work for you better for your project.

Cheers!

No, this doesn’t solve the issue. The same behavior still occurs.

The offset from the mouse cursor linearly increases with the screen position. It is not constant. At screen position [0,0] (top left corner), there is no offset and the dragged widget is under the cursor where it should be. But near the bottom right corner, it is as much as 200+ px away from cursor. Again, the distance increases with screen position

Hello again,

Could you provide a detailed list of steps to reproduce your issue so that I can reproduce your issue on our end?

Thank you!

I downloaded engine version 4.18, created a new First Person BP project, created a widget that is draggable, created a widget used for visual, set up the drag operation in the draggable widget and played the game.

EDIT:
I just verified the bug once again. I created a new FP BP project on version 4.17, and it works as it should. After converting the project to 4.18 OR creating a brand new project once again, the issue starts occuring.

The reason your issue could be occurring is that you don’t have a variable setup for a drag offset with your Drag Drop Operation. With the drag offset applied I am not experiencing the issue you appear to be having. You can find a tutorial on making the drag-drop system which uses the drag offset here:
Creating Drag and Drop UI in Unreal Engine | Unreal Engine 5.1 Documentation

No, that’s not the reason. The drag offset variable used in the tutorial is a custom property only used for functionality after the widget has been dropped. This variable doesn’t affect the internal drag mechanics in any way.
Another odd thing I noticed, is that the dragged widget can move outside the viewport, as shown in the picture. Not sure if it’s the intended behavior but I hope it helps.
Note that the cursor is not visible on the screenshot, but it’s inside the game viewport.

227123-outside-viewport.png

I have the same problem and my widgets go out of the viewport, everything was working fine in 4.15 but now it’s all broken, drag doesn’t work with some widgets even

I too am seeing this issue whereby ‘The offset from the mouse cursor linearly increases with the screen position’. This is happening to me in 4.18.

Just to let you know, I still weren’t able to fix it or find the cause of this issue. I’m not sure what do do about this, but it breaks the whole interface of my game.

I just tried this on 4.19 Preview 2 and it has been fixed!

I am using 4.18.3 and I am having the exact same problem.
Is this solved or should I update the engine version for my project ?

I am using 4.18.3 and I am having the exact same problem.
Is this solved or should I update the engine version for my project ?