gantt icon indicating copy to clipboard operation
gantt copied to clipboard

browser locked

Open hosein-xz opened this issue 5 years ago • 5 comments

when I want to drag task the entire page are locked and page not response any more i config it exactly like Readme file. what should i do?

hosein-xz avatar Jul 28 '19 10:07 hosein-xz

You are likely having the same issue I had, which seemed to be caused by complex dependency nesting. There is an issue with the way dependencies are resolved, which can lead to infinite loops with certain dependency trees. I have a fix for this. Will PR at some point.

gryphonmyers avatar Jul 05 '20 18:07 gryphonmyers

For me this option seems to solve the problem: popup_trigger: 'mouseover'

Trickscenique avatar Jan 05 '22 16:01 Trickscenique

Ok i think i've find the real issue, when two tasks are dependent, it create an infinite loop in in Gantt class 's method get_all_dependent_tasks.
It's not perfect but my fix prevent the browser block. Replace const ids = [parent_bar_id, ...this.get_all_dependent_tasks(parent_bar_id)];

By this this.initial_id = parent_bar_id; const ids = [parent_bar_id, ...this.get_all_dependent_tasks(parent_bar_id)];

And this get_all_dependent_tasks(task_id) { let out = []; let to_process = [task_id]; while (to_process.length) { const deps = to_process.reduce((acc, curr) => { acc = acc.concat(this.dependency_map[curr]); return acc; }, []); out = out.concat(deps); to_process = deps.filter(d => !to_process.includes(d)); } return out.filter(Boolean); }

by this get_all_dependent_tasks(task_id) { let out = []; for (let task of this.tasks) { if (task.id == task_id) { for (let dep of task.dependencies) { out.push(dep); if (dep != this.initial_id) { out.concat(this.get_all_dependent_tasks(dep)); } } out.concat(task.dependencies); } } return out; }

Trickscenique avatar Jan 05 '22 19:01 Trickscenique

Can you create a PR for your fix?

m50S79sM6SRNp8Jn avatar Aug 19 '23 19:08 m50S79sM6SRNp8Jn

Can This be escalated to a higher priority? this is an absolutely crippling bug. (which still exists btw)

Andrelopithecus avatar Nov 10 '23 20:11 Andrelopithecus

Hey @Andrelopithecus @m50S79sM6SRNp8Jn: am I correct in understanding that this happens when two tasks depend on each other?

While I agree that we should fix something, technically users shouldn't be allowed to do that.

@gryphonmyers if you have a PR, could you submit?

safwansamsudeen avatar Apr 04 '24 19:04 safwansamsudeen

Hey @Andrelopithecus @m50S79sM6SRNp8Jn: am I correct in understanding that this happens when two tasks depend on each other?

While I agree that we should fix something, technically users shouldn't be allowed to do that.

@gryphonmyers if you have a PR, could you submit?

Sorry, it's been so long and I don't appear to have a fork of this, so I probably never committed my fix and have no hope of finding it. If memory serves, it was not a case of circular relationships, it was an issue that happened during pretty normal use.

gryphonmyers avatar Apr 04 '24 23:04 gryphonmyers

I think we can close this then, as it's 5+ years old and the details aren't clear. If anybody faces this, please comment here/add a new issue.

safwansamsudeen avatar Apr 05 '24 08:04 safwansamsudeen