Skip to content

Commit

Permalink
Added CaptureMouse() for drag fix #306
Browse files Browse the repository at this point in the history
Mouse needs to be captured at the start, to listen mouse move events before document IsActive is set.
  • Loading branch information
Muhahe authored Oct 8, 2021
1 parent 9ffd291 commit e8f2d46
Showing 1 changed file with 1 addition and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,7 @@ protected virtual void OnModelChanged(DependencyPropertyChangedEventArgs e)
protected override void OnMouseLeftButtonDown(MouseButtonEventArgs e)
{
base.OnMouseLeftButtonDown(e);
CaptureMouse();
_allowDrag = false;
Model.IsActive = true;
if (Model is LayoutDocument layoutDocument && !layoutDocument.CanMove) return;
Expand Down

0 comments on commit e8f2d46

Please sign in to comment.