Skip to content

SelectionListNode: 'Other' option auto-starts text input on navigation #102

@Aaronontheweb

Description

@Aaronontheweb

Description

When using WithOtherOption() on a SelectionListNode<T>, navigating to the "Other" item with arrow keys automatically starts text input mode. This replaces the "Other..." label with a text input field immediately, which can be surprising/confusing to users.

Current Behavior

In SelectionListNode.cs lines 352-361:

private void MoveHighlight(int delta)
{
    // ...
    _highlightedIndex = Math.Clamp(_highlightedIndex + delta, 0, _items.Count - 1);
    EnsureVisible();

    // Auto-start text input when navigating to "Other" option
    var item = _items[_highlightedIndex];
    if (item.IsOther && !_isEditingOther)
    {
        StartOtherInput();
    }
    // ...
}

When arrowing down to the "Other" option:

  1. The "Other..." label immediately disappears
  2. A text input field appears in its place
  3. User is now in text input mode

Expected Behavior

The "Other" option should behave like other items:

  1. Arrow to it → highlight it (show "Other..." label highlighted)
  2. Press Enter or Space → then start text input mode

This matches the pattern used for regular items where highlighting ≠ selection/action.

User Experience Issue

Current flow:

↓ Navigate to "Other..."
   [Immediately shows text input, label gone]
   User: "Wait, where did the option go?"

Expected flow:

↓ Navigate to "Other..."
   ● Other...        <-- Highlighted but still visible
Enter
   [Now shows text input]

Suggested Fix

Remove the auto-start behavior from MoveHighlight():

private void MoveHighlight(int delta)
{
    if (_items.Count == 0)
        return;

    _highlightedIndex = Math.Clamp(_highlightedIndex + delta, 0, _items.Count - 1);
    EnsureVisible();
    Invalidate();
    // Remove: auto-start text input when navigating to "Other" option
}

The existing ToggleSelection() and ConfirmSelection() methods already handle starting text input when "Other" is selected via Space/Enter.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions