Why is UI Toolkit ListView Reorderable when unchecked?

So I have this ui toolkit element I am using at runtime that is configured not to be re-orderable:

r/Unity3D - Why is UI Toolkit ListView Reorderable when unchecked?

However I can still freely click+drag and reorder the elements in the list view, why would this happen?

When I run the game in the editor and use the ui debugger, I can get the list to not reorder if I manually set the picking mode to Ignore for all the elements under the list view here

r/Unity3D - Why is UI Toolkit ListView Reorderable when unchecked?

And while I could do this in code, it seems like I should not have to so I wanted to make sure I am not missing anything obvious.

I have done a quick search in unity bug tracker and don’t see anything related.

We do currently have a bug that sounds similar Unity Issue Tracker - The list remains orderable when NonReorderableAttribute is used
Are you using the non-reorderable attribute?
If not then its worth filling a bug report Unity QA: Building quality with passion

Not sure what you mean by this, I uncheck the Reorderable in the ui builder and that is it (I also tried setting listView.reorderable to false with no effect).

Right now I have this code:

 public static void ConfigureListViewNotOrderable(ListView listView) {
  listView.RegisterCallback<PointerDownEvent>(OnPointerDown, TrickleDown.TrickleDown);
  listView.RegisterCallback<PointerMoveEvent>(OnPointerMove, TrickleDown.TrickleDown);
}

public static void UnconfigureListViewNotOrderable(ListView listView) {
  listView.UnregisterCallback<PointerDownEvent>(OnPointerDown, TrickleDown.TrickleDown);
  listView.UnregisterCallback<PointerMoveEvent>(OnPointerMove, TrickleDown.TrickleDown);
}

private static void OnPointerDown(PointerDownEvent evt) {
  evt.StopPropagation();
}

private static void OnPointerMove(PointerMoveEvent evt) {
  evt.StopPropagation();
}

and then I just pass the list view to make it not orderable (or undo it if needed).

Could you please file a bug report so we can look into it? Unity QA: Building quality with passion

I will when I can find time however I can’t send you the project I am working on so creating a minimal project with the issue is not really high on my priority list.

1 Like