Steps to reproduce:
- Create a new project
- Create and open any UXML (UI Document) in the UI Builder
- Add a VisualElement to Hierarchy and select it
- In the Inspector, under Background, set the Image dropdown to "Gradient"
- Click the Color field to open the Gradient Editor
- Observe the Gradient Editor has two alpha keys (top) and two color keys (bottom)
- Drag one of the bottom color keys to a different position
- Drag another bottom color key to a different position
- Press Ctrl+Z (Cmd+Z on macOS)
- Observe the Gradient Editor
Actual results: An additional alpha key is added at the top of the Gradient Editor, and an additional color key is added at the bottom
Expected results: Undo restores the previous state without adding any keys
Reproducible with versions: 6000.7.0a4
Can’t test with versions: 6000.6.0b7 and lower (Background Gradients are not available)
Tested on (OS): macOS 26.5