Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
TimePerformance opened this issue Oct 4, 2019 · 2 comments
Closed

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

TimePerformance opened this issue Oct 4, 2019 · 2 comments

Comments

@TimePerformance
Copy link

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
@TimePerformance
Copy link
Author

I've jsut created a pull request

@mar10
Copy link
Owner

mar10 commented Oct 8, 2019

Thanks for fixing that. looks like it works!
However, your patch changes 39 files. Seems you made and commited a build?
Can you cleanup a bit, so only one file is affected. You can also add aline to the changelog if you like.
Thanks!

@mar10 mar10 closed this as completed in dc05bbe Oct 25, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants