decentraland / decentraland/unity-explorer
[QA] SDK UI | Input Text "OnSubmit" callback not working on Enter/Return key
- Dominant language
- C#
- Stars
- 23
- Forks
- 17
- Avg merge
- 2d 16h
- Merged PRs (30d)
- 101
Description
### 🛠️ **Build version:**
- **v0.134.0**
### 📔 **Issue Description:**
According to the SDK documentation, pressing Enter/Return while focused on a UI Input Text field should clear the field and call its `OnSubmit` callback. However, this is not working - instead, the chat window opens and nothing happens with the input field.
**Documentation reference:** https://docs.decentraland.org/creator/scenes-sdk7/2d-ui/ui_special_types#input-text
this was [reported](https://decentralandteam.slack.com/archives/C05T5G3E9SN/p1773856887058729) on qa-team by @pravusjif
### 👣 **STR:**
1. Run the SDK UI test scene locally: https://github.com/decentraland/sdk7-test-scenes/tree/main/scenes/81%2C-3-ui-2
2. Click on any text input field to focus it
3. Type some text in the field
4. Press Enter/Return key
5. Observe the chat window opens instead
6. Observe the text field is NOT cleared
7. Observe the OnSubmit callback is NOT triggered
### ✔️ **Expected Result:**
When pressing Enter/Return key while focused on an Input Text field:
- The text field should be cleared
- The OnSubmit callback should be triggered
- The chat window should NOT open
### ❌ **Actual Result with evidence:**
When pressing Enter/Return key:
- The chat window opens
- The text field remains unchanged (not cleared)
- The OnSubmit callback is not triggered
https://github.com/user-attachments/assets/c6811c4e-d6cc-4c20-8e71-1bc5ae97f4ae
### ➗ **Reproduction:**
🔁 Always - 100% reproduction rate
#### 🖥️ **Operative system and additional Notes:**
**macOS and Windows**
This is a critical SDK functionality issue affecting all Input Text UI components. The Enter/Return key is being intercepted by the chat system instead of being handled by the SDK UI component.
Contributor guide
Assessment
This issue has not been assessed yet.