Skip to content

Commit 22de667

Browse files
authored
fix: onSHAPressed avoid right click nav (#770)
- When the right click button is pressed it should not navigate to the parent. Navigation actions only should execute with the left button.
1 parent 0b73f7b commit 22de667

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/Views/CommitBaseInfo.axaml.cs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,9 @@ private async void OnSHAPointerEntered(object sender, PointerEventArgs e)
151151

152152
private void OnSHAPressed(object sender, PointerPressedEventArgs e)
153153
{
154-
if (DataContext is ViewModels.CommitDetail detail && sender is Control { DataContext: string sha })
154+
var point = e.GetCurrentPoint(this);
155+
156+
if (point.Properties.IsLeftButtonPressed && DataContext is ViewModels.CommitDetail detail && sender is Control { DataContext: string sha })
155157
{
156158
detail.NavigateTo(sha);
157159
}

0 commit comments

Comments
 (0)