Steps to reproduce:
- Create and open a new project
- In Hierarchy, 'Right-click -> UI Toolkit -> Standard Elements -> Visual Element'
- Select the Visual Element in UI/main stage
- Press F2 to rename the Visual Element
- Try naming it to "!@#$" (fails, reverts to previous value)
- In Inspector, rename it to "!@#$" and observe the Hierarchy
Actual results: The Visual Element is named to "!@#$"
Expected results: The Visual Element name is reverted to the previous value
Reproducible with versions: 6000.6.0b1, 6000.6.1f1, 6000.7.0a6
Can’t test with versions: 6000.0.82f1, 6000.3.23f1, 6000.5.11f1, 6000.6.0a7 (No UI stage in Hierarchy)
Tested on (OS): Windows 11 Pro (25H2)
Notes:
- Does not reproduce in UI Builder
- This bug could cause problems with parsing element names in scripts