@ -337,7 +337,9 @@ namespace AvalonDock
protected virtual void OnDragMouseLeave(object sender, MouseEventArgs e)
{
if (!e.Handled && isMouseDown && e.LeftButton == MouseButtonState.Pressed && Manager != null)
// The MouseLeave event can occur if the managed content was closed while the user held the left mouse button pressed.
// In that case, this.IsLoaded will be false and we won't handle the event
if (!e.Handled && isMouseDown && e.LeftButton == MouseButtonState.Pressed && Manager != null && this.IsLoaded)
if (!IsMouseCaptured)