Skip to content

Use bubble routing for inline edit double taps - #356

Merged
wieslawsoltes merged 2 commits into
masterfrom
agent/324-inline-edit-double-tap
Aug 18, 2026
Merged

wieslawsoltes merged 2 commits into
masterfrom
agent/324-inline-edit-double-tap

Conversation

@wieslawsoltes

Copy link
Copy Markdown
Owner

Summary

  • subscribe InlineEditBehavior to DoubleTappedEvent with bubble routing
  • restore double-tap activation for both the configured display control and associated object
  • add headless regression coverage for both activation paths
  • document that nested display content participates through routed bubbling

Problem

InlineEditBehavior registered its two double-tap handlers with RoutingStrategies.Tunnel. Avalonia's InputElement.DoubleTappedEvent is bubble-routed, so those handlers were never reached. As a result, the sample EditableItem and consumer controls no longer entered edit mode on a double tap after ShowOnDoubleTappedBehavior was replaced.

Root cause

The predecessor behavior and the library's typed DoubleTappedEventTrigger use the routed event's bubble strategy. InlineEditBehavior introduced a strategy mismatch by explicitly requesting the unsupported tunnel route for this event.

Changes

  • change the display-control handler from RoutingStrategies.Tunnel to RoutingStrategies.Bubble
  • change the associated-object handler from RoutingStrategies.Tunnel to RoutingStrategies.Bubble
  • retain the existing key, focus, visibility, and detach behavior unchanged
  • document nested-content activation semantics

Tests

Added headless tests proving that:

  • double-tapping the configured DisplayControl hides it and shows the edit control
  • double-tapping content inside the associated object does the same when EditOnAssociatedObjectDoubleTapped is enabled

Both tests fail against the previous tunnel-only implementation and pass with this change.

Validation

  • dotnet test tests/Xaml.Behaviors.Interactions.UnitTests/Xaml.Behaviors.Interactions.UnitTests.csproj --filter 'FullyQualifiedName~InlineEditBehaviorTests' --no-restore
    • 2 passed, 0 failed
  • dotnet test tests/Xaml.Behaviors.Interactions.UnitTests/Xaml.Behaviors.Interactions.UnitTests.csproj --no-restore
    • 91 passed, 0 failed, 2 pre-existing skipped drag tests
  • git diff --check

Closes #324

@wieslawsoltes
wieslawsoltes marked this pull request as ready for review July 14, 2026 22:18

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 581b0f91fc

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@pull-request-size pull-request-size Bot added size/L and removed size/M labels Jul 14, 2026
@wieslawsoltes
wieslawsoltes merged commit 7efa5bf into master Aug 18, 2026
3 checks passed
@wieslawsoltes
wieslawsoltes deleted the agent/324-inline-edit-double-tap branch August 18, 2026 08:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

EditableItem.axaml : DoubleTappedEvent not working

1 participant