From 1344beba56412ee693590594ea102795635183de Mon Sep 17 00:00:00 2001 From: mika kuns Date: Thu, 23 Apr 2026 13:08:02 +0200 Subject: [PATCH] fix(ui): select task on left-click even when reorder is disabled The tunnel pointer handler returned early when CanReorder was false, so clicking a row in smart/virtual lists never updated the details pane. Select first, then bail out of the drag path; also skip drag initialisation on nested buttons so the done-toggle click still fires. --- .../Views/Islands/TasksIslandView.axaml.cs | 26 +++++++++++++++---- 1 file changed, 21 insertions(+), 5 deletions(-) diff --git a/src/ClaudeDo.Ui/Views/Islands/TasksIslandView.axaml.cs b/src/ClaudeDo.Ui/Views/Islands/TasksIslandView.axaml.cs index 9f53c8d..3137855 100644 --- a/src/ClaudeDo.Ui/Views/Islands/TasksIslandView.axaml.cs +++ b/src/ClaudeDo.Ui/Views/Islands/TasksIslandView.axaml.cs @@ -15,8 +15,6 @@ public partial class TasksIslandView : UserControl public TasksIslandView() { InitializeComponent(); - // Tunnel handler runs BEFORE Button's class handler so we can start a drag - // without the Button first marking the event as handled. AddHandler(PointerPressedEvent, OnTunnelPointerPressed, RoutingStrategies.Tunnel); DataContextChanged += (_, _) => { @@ -27,14 +25,25 @@ public partial class TasksIslandView : UserControl private async void OnTunnelPointerPressed(object? sender, PointerPressedEventArgs e) { - if (DataContext is not TasksIslandViewModel vm || !vm.CanReorder) return; + if (DataContext is not TasksIslandViewModel vm) return; if (e.Source is not Visual src) return; var button = src as Button ?? src.FindAncestorOfType