From 8b11a940b52586fec922d055db9cc0e3c6938ebc Mon Sep 17 00:00:00 2001 From: Evgeny Gorbovoy <jinek@msn.com> Date: Thu, 19 Dec 2024 22:22:23 +0100 Subject: [PATCH] more PR fixes --- .../Controls/Helpers/SelectTextWithPointerUpExtension.cs | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/Consolonia.Themes/Templates/Controls/Helpers/SelectTextWithPointerUpExtension.cs b/src/Consolonia.Themes/Templates/Controls/Helpers/SelectTextWithPointerUpExtension.cs index 59fd6b35..5535c3bb 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<IConsole>(); 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);