diff --git a/src/Consolonia.Themes/Templates/Controls/Helpers/SelectTextWithPointerUpExtension.cs b/src/Consolonia.Themes/Templates/Controls/Helpers/SelectTextWithPointerUpExtension.cs index 59fd6b3..5535c3b 100644 --- a/src/Consolonia.Themes/Templates/Controls/Helpers/SelectTextWithPointerUpExtension.cs +++ b/src/Consolonia.Themes/Templates/Controls/Helpers/SelectTextWithPointerUpExtension.cs @@ -20,8 +20,8 @@ static SelectTextWithPointerUpExtension() { var console = AvaloniaLocator.Current.GetService(); bool supportsMouse = console.SupportsMouse; - bool supportsMoveMove = console.SupportsMouseMove; - if (!supportsMouse || supportsMoveMove) + bool supportsMouseMove = console.SupportsMouseMove; + if (!supportsMouse || supportsMouseMove) return; SelectOnMouseRightUpProperty.Changed.SubscribeAction(OnPropertyChanged); @@ -41,6 +41,9 @@ private static void OnPointerReleased(object sender, PointerReleasedEventArgs e) // simplified copy of SelectableTextBlock.PointerMove var tb = (SelectableTextBlock)sender; + if (e.InitialPressMouseButton != MouseButton.Left) + return; + Thickness padding = tb.Padding; Point point = e.GetPosition(tb) - new Point(padding.Left, padding.Top);