Opened 10 years ago
Closed 7 years ago
#15893 closed defect (patchwelcome)
Tree: rearchitect DnD support to avoid race conditions
Reported by: | bill | Owned by: | bill |
---|---|---|---|
Priority: | low | Milestone: | 1.13 |
Component: | Dijit | Version: | 1.8.0 |
Keywords: | Cc: | ||
Blocked By: | Blocking: |
Description
Currently Tree handles DnD via the circuitous route of
- dndSource makes modifications to store
- store notifies Tree that data has been deleted
- store notifies tree that data has been added
- Tree infers that there was a DnD operation, and moves the dragged subtree(s).
This is good because DnD on one machine can be reflected on another machine (assuming a good client/server store with proper notification of changes via comet), and it also supports a theoretical application where two trees are connected to the same store.
However, it has timing issues. Since the delete processing is delayed, if a delete is followed immediately by an add of the same node (or a subnode of the same node), bad things could happen. See http://bugs.dojotoolkit.org/attachment/ticket/15858/tree_bug_02.html for an example.
Probably, it makes sense for Tree to handle a DnD operation directly (supporting the concept of moving a subtree or subtrees), and then make the Tree code idempotent so it can just ignore the subsequent data store notifications.
Change History (3)
comment:1 Changed 10 years ago by
comment:2 Changed 9 years ago by
Milestone: | tbd → future |
---|---|
Priority: | undecided → low |
comment:3 Changed 7 years ago by
Milestone: | future → 1.12 |
---|---|
Resolution: | → patchwelcome |
Status: | new → closed |
Given that no one has shown interest in creating a patch in the past 3+ years, I'm closing this as patchwelcome.
See additional comment 9 in ticket #15858 and proposed fix.