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.28k stars 400 forks source link

Check for IsHitTestVisible during hit tests #498

Open VacuumBreather opened 3 months ago

VacuumBreather commented 3 months ago

What changed?

During the hit tests checks, the IsHitTestVisible property is ignored, only IsVisible is checked later.

This can lead to issues when a TextBox is overlayed by a TextBlock with IsHitTestVisible=false (for example in a naming control with edit and readonly states). The HitTest will detect the TextBlock in the foreground, see IsVisible = false and return. The visible TextBox is completely ignored and the drag is executed anyway.

This PR should fix that issue.