diff --git a/src/Views/Blame.axaml.cs b/src/Views/Blame.axaml.cs index 1146835c..56fd4c2b 100644 --- a/src/Views/Blame.axaml.cs +++ b/src/Views/Blame.axaml.cs @@ -234,6 +234,7 @@ namespace SourceGit.Views TextArea.LeftMargins.Add(new CommitInfoMargin(this) { Margin = new Thickness(8, 0) }); TextArea.LeftMargins.Add(new VerticalSeperatorMargin(this)); TextArea.LayoutUpdated += OnTextAreaLayoutUpdated; + TextArea.PointerWheelChanged += OnTextAreaPointerWheelChanged; TextArea.TextView.ContextRequested += OnTextViewContextRequested; TextArea.TextView.VisualLinesChanged += OnTextViewVisualLinesChanged; TextArea.TextView.Margin = new Thickness(4, 0); @@ -333,6 +334,12 @@ namespace SourceGit.Views InvalidateVisual(); } + private void OnTextAreaPointerWheelChanged(object sender, PointerWheelEventArgs e) + { + if (!TextArea.IsFocused) + Focus(); + } + private void OnTextViewContextRequested(object sender, ContextRequestedEventArgs e) { var selected = SelectedText;