s&box/field-guide
the symptom, in your words

"TextEntry is the house control, not HTML input"

✓ verified on engine 26.07lane: Building UIposted
▸ SYMPTOM
  • You use <input onchange=@(e => ...)> in a razor panel — it compiles (the AspNetCore.Components types are real) but doesn't behave like engine UI.
  • Enter key submission doesn't work, or you're unsure how to wire it.
▸ CAUSE

s&box's UI layer uses its own TextEntry component, not standard HTML <input>. While Blazor's <input> types compile because the underlying AspNetCore.Components references exist, the engine's own panels (addons/base, addons/menu) all use TextEntry with a different event model.

▸ FIX

Use TextEntry with onsubmit for Enter handling:

snippet
<TextEntry MaxLength=@maxLen onsubmit=@OnSubmit />
snippet
void OnSubmit()
{
    // Fires when user presses Enter
    // Text is available via the event
}

Use OnTextEdited for live keystroke updates:

snippet
void OnTextEdited(string newText)
{
    // Fires on every keystroke
    // NOT a Blazor ChangeEventArgs — it's a plain string
}

How it works internally: TextEntry.OnButtonTyped fires CreateEvent("onsubmit", Text) on Enter. Razor binds it the same way as onclickonsubmit=@Method takes a plain no-arg Action.

Engine references to verify against:

  • addons/base/code/UI/Chat/ChatPanel.razorTextEntry with onsubmit
  • addons/menu/code/MainSearchBar.razor — live search with OnTextEdited
▸ WHY IT WORKS

The engine's razor runtime maps element attributes to component properties and routes custom events (onsubmit) through its own event system, not the browser DOM. TextEntry handles focus, cursor, selection, and Enter detection internally — reimplementing any of that with raw <input> means fighting the engine's own input pipeline. When in doubt, grep addons/base and addons/menu for a working usage before inventing a new pattern.

Verified on engine 26.07 — seen in a real project.
s&box moves fast; an undated fix is a liability. Spot a stale detail?