Steps to reproduce:
- Create and open a new project
- Create an "Assets/Create/UI Toolkit/Standard Elements/Button"
- Create the UXML
- Duplicate it
- Open the document in the in-scene UI Viewport
- Right-click the "Name" column header in the Hierarchy and enable every option
- Grab one of the buttons and drag it under the 'Active' column between the buttons
- Observe the Console
Actual results: "IndexOutOfRangeException: index -1 is out of range [0, 7]" is thrown
Expected results: Nothing is thrown; the element is placed in the new place (or doesn't if moved far enough)
Reproducible with versions: 6000.6.0b8, 6000.7.0a4
Can’t test with versions: 6000.0.81f1, 6000.3.22f1, 6000.5.8f1, 6000.6.0a1 (Doesn't support editing outside of UI Builder)
Tested on (OS): Windows 11 Pro (25H2)
Notes:
- Doesn't happen in normal scene Hierarchy
- Doesn't happen with elements dragged from UI Library window