Add clearOnSubmit protocol field to text input
enhancementprotocol/sdk
## Description
Scene creators currently have no control over whether text input fields clear when the user presses Enter. The current behavior always clears the input, which forces developers to implement workarounds (Pablo reports 7 workarounds in their code, including "hacky flickering effects").
## Proposed Solution
Add a `clearOnSubmit` boolean field to the text input protocol that controls whether the input text is cleared when Enter is pressed.
**Default behavior:** `true` (clear on submit) — maintains current behavior for backwards compatibility
**When `false`:** Text remains in the input field after pressing Enter
## Related Context
- Issue #739 reports issues with Enter key behavior in text inputs
- Scene creators need this control to implement various UX patterns (e.g., chat inputs where you might want to keep the text, vs. forms where clearing makes sense)
## Implementation Notes
This protocol field should be implemented consistently across all Decentraland clients (bevy-explorer, godot-explorer) to ensure scene compatibility.
Requested by rob via Slack
0 条评论