From 6cd70e835ca541ab4fbcf540537c37636b710454 Mon Sep 17 00:00:00 2001 From: Siegfried Pammer Date: Fri, 8 May 2026 11:16:57 +0200 Subject: [PATCH] Drop pointer-event intercept on filter TextBox MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The PointerPressed/Released intercept was too aggressive — it ran before the TextBox's own focus handler, so the user could no longer click into the input. The TextProperty-observable change alone is the fix that makes typing flow into ColumnFilter.Text. Assisted-by: Claude:claude-opus-4-7:Claude Code --- ILSpy/Metadata/MetadataColumnBuilder.cs | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/ILSpy/Metadata/MetadataColumnBuilder.cs b/ILSpy/Metadata/MetadataColumnBuilder.cs index 8bd6c2f0f..38f4c0c2c 100644 --- a/ILSpy/Metadata/MetadataColumnBuilder.cs +++ b/ILSpy/Metadata/MetadataColumnBuilder.cs @@ -28,8 +28,6 @@ using Avalonia.Controls; using Avalonia.Controls.Templates; using Avalonia.Data; using Avalonia.Data.Converters; -using Avalonia.Input; -using Avalonia.Interactivity; using Avalonia.Layout; using Avalonia.Media; using Avalonia.Reactive; @@ -134,16 +132,6 @@ namespace ILSpy.Metadata HorizontalAlignment = HorizontalAlignment.Stretch, Text = filter.Text, }; - // Stop pointer-press / -release events from bubbling to the column header — - // otherwise DataGridColumnHeader.OnPointerPressed treats the click as a sort - // gesture and never lets the TextBox take focus, so the user sees the box but - // can't actually type into it. - box.AddHandler(InputElement.PointerPressedEvent, - static (_, e) => e.Handled = true, - RoutingStrategies.Tunnel | RoutingStrategies.Bubble); - box.AddHandler(InputElement.PointerReleasedEvent, - static (_, e) => e.Handled = true, - RoutingStrategies.Tunnel | RoutingStrategies.Bubble); // Use the TextProperty observable rather than the TextChanged event — for // header-hosted TextBoxes the latter doesn't fire reliably (the column header // re-templates on layout updates), but property-change notifications do.