punker76 / gong-wpf-dragdrop

The GongSolutions.WPF.DragDrop library is a drag'n'drop framework for WPF
BSD 3-Clause "New" or "Revised" License
2.31k stars 405 forks source link

Drag adorner freezes on screen after middle mouse button is pressed #493

Open RayCarrot opened 7 months ago

RayCarrot commented 7 months ago

Describe the bug There appears to be a bug where the drag adorner can freeze in place on screen. The way I've been able to consistently reproduce it is by dragging an item, while holding down my left mouse button, and then pressing the middle mouse button.

To Reproduce Steps to reproduce the behavior:

  1. Go to the "Mixed" page in the showcase app
  2. Drag any item with the left mouse button, and without letting go press the middle mouse button
  3. The adorner is now stuck on screen and will even overlap other windows

Expected behavior I expect the drag-drop operation to be fully canceled and the adorner to stop showing

Screenshots Showcase

Desktop (please complete the following information):

VacuumBreather commented 4 months ago

I can confirm this issue, and it happens in our project also under other circumstances, which we haven't been able to reliably reproduce yet, but seem to have the same core issue. State is not correctly reset on Drag Cancellation under certain circumstances. See my PR for a possible fix.