Skip to content
This repository was archived by the owner on Mar 28, 2025. It is now read-only.
This repository was archived by the owner on Mar 28, 2025. It is now read-only.

Nasty bug with drag&drop and expand/collapse #107

@SeriousMonk

Description

@SeriousMonk

There is a bug when using drag and drop together with the expand/collapse node feature that crashes the app if an item is dragged far from its original spot so that the childWhenDragging widget is outside viewport (to the point where it gets disposed by flutter).
In this situation, if the dragged item is hovered over another node and expands that node, an error is thrown and scrolling gets freezed. However if all nodes are already expanded everything works fine even if the item is dragged very far from its original place.

Steps to reproduce this bug:

  1. Run the example app on web
  2. Switch to Drag and Drop example
  3. Expand all first-leve nodes 0, 14, 22, 29, 38, 53
  4. Make the window size smaller in height (so that scrolling is required)
  5. Expand node 57
  6. Drag the last node 61 to the top and hover it over node 1 to expand it

The following errors will appear in console and everything will stop working:

Assertion failed: file:///C:/Flutter/flutter/packages/flutter/lib/src/rendering/mouse_tracker.dart:203:12
!_debugDuringDeviceUpdate
is not true

and

Duplicate GlobalKeys detected in widget tree.

I am on flutter 3.29.2.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions