Skip to content

Ext-dnd5: bug in function onDropEvent (case 'dragover') #966

@TimePerformance

Description

@TimePerformance

Sorry it is difficult to describe the problem but the bug can cause a lot of issues as the data object is not well initialized.

How to reproduce:

In the demo of the dnd5 extension, it shouldn't be allowed to drop a folder on itself (according to preventVoidMoves = true and the code) but it is allowed.

Analysis:

After searching for hours, it seems that a call to prepareDropEffectCallback(event, data) is missing before the line 833
LAST_HIT_MODE = handleDragOver(event, data);
Without it, data is not well initialized (for instance dropEffect is undefined)
Actually, adding the call to prepareDropEffectCallback seems to solve the problem.

  • Fancytree version: v2.32.0
  • affected extensions: dnd5

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions