Search Issue Tracker
By Design
By Design in 2023.1.X
Votes
0
Found in
2020.3.37f1
2021.3.6f1
2022.1.9f1
2022.2.0b1
2023.1.0a3
Issue ID
UUM-8939
Regression
No
ToolbarSearchField value is not cleared when pressing Esc after refocusing
Reproduction steps:
1. Open the attached “ToolbarSearchFieldEscape“ project
2. Open the Reproduction window (Window > Reproduction)
3. Input some text into the field
4. Unfocus and refocus the field
5. Press the Esc key
Expected result: The field value is empty
Actual result: The field value is not empty
Reproduced with: 2020.3.37f1, 2021.3.6f1, 2022.1.9f1, 2022.2.0b1, 2023.1.0a3
Reproduced on: Windows 11, macOS 12.4 Darwin 21.5.0
Note: Esc seems to clear only the text entered during the latest focus
Add comment
All about bugs
View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.
Latest issues
- Performance Markers Search window shows an empty entry in the list
- Enabling Deep Profiling in Performance Markers Search window breaks Inspector panel buttons when navigating through the marker items
- An "InvalidOperationException" error is thrown when TryRemoveItem is used with rebuildTree set to false
- Build fails with IL2CPP error when building on Android platform in a specific project
- Resize to Fit option for Import Activity window's Columns does nothing
Resolution Note:
Hi, this is working as expected. Based on what’s documented in the Editor Foundations Design System:
- Pressing escape cancels current entry and reverts the field to the value it was before editing began (https://www.foundations.unity3d.com/components/text-field#Behavior:~:text=Keyboard%20interactions)
- If the field is selected and empty, and a value is typed while editing, hitting Esc would clear the field back to empty before returning to the focused state
- If the field is selected and contains a value which is modified (or removed) by typing, hitting Esc would revert the field back to the original value before returning to the focused state
Basically, Esc should mean “a shortcut to invoke a cancel action” or “cancelling an in-progress action” vs explicitly “clear this field”.
Resolution Note (2023.1.X):
Hi, this is working as expected. Based on what’s documented in the Editor Foundations Design System:
- Pressing escape cancels current entry and reverts the field to the value it was before editing began (https://www.foundations.unity3d.com/components/text-field#Behavior:~:text=Keyboard%20interactions)
- If the field is selected and empty, and a value is typed while editing, hitting Esc would clear the field back to empty before returning to the focused state
- If the field is selected and contains a value which is modified (or removed) by typing, hitting Esc would revert the field back to the original value before returning to the focused state
Basically, Esc should mean “a shortcut to invoke a cancel action” or “cancelling an in-progress action” vs explicitly “clear this field”.