Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

177
Views
Fancy Tree dnd5 doesn't work when dragging over valid and invalid folders at the same time

Dragging a file right away to a valid folder works but when I try to drag a file across an invalid folder and then back to a valid folder, it fails. It logs this in the console when I am dragging across an invalid folder. Do I somehow need to manually change this property? Fancytree@1 applyDropEffectCallback: allowDrop === false

my current code is simple.

        dragStart: function(node, data) {
          //Prevent user from moving folder
            if (node.isFolder()) {
              return false
            } 
              return true
        },
        dragEnter: function(node, data) {
            if (node.data.restricted){
               return false;
            }
            return true;
        }}

Structure of my fancy tree.

Root Folder
   --Sub Folder 1
   --Sub Folder 2
   --Sub Folder 3

Inside each subfolder is a file that I am trying to drag and drop to another valid folder. Each folder has a property called restricted that I check against to know if it's a valid folder to drop in. In the above case, the root folder and subfolder 3 are invalid. If I drag and drop a file from folder 1 to folder 2. It works. But when I dnd it from folder 1 to folder 3(it will restrict me as intended), and still holding the mouse click, back to folder 2. It remains restricted(dragEnter logs true correctly) and now I can not drop the file in any valid folder. Once I let go of the mouse click, the same behavior repeats where I can dnd into a valid folder initally.

about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!